mirror of
https://github.com/Relintai/godot-engine.file-editor.git
synced 2025-05-22 14:17:42 +02:00
bugfix error for project launch
- `editor_plugin` var available only inside function - plugin loaded only when in editor
This commit is contained in:
parent
ddea73e0a7
commit
c9250fa989
@ -67,6 +67,8 @@ var current_csv_editor : Control
|
|||||||
var current_font : DynamicFont
|
var current_font : DynamicFont
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
if not Engine.is_editor_hint():
|
||||||
|
return
|
||||||
clean_editor()
|
clean_editor()
|
||||||
update_version()
|
update_version()
|
||||||
connect_signals()
|
connect_signals()
|
||||||
@ -167,7 +169,6 @@ func update_version():
|
|||||||
if err == OK:
|
if err == OK:
|
||||||
plugin_version = config.get_value("plugin","version")
|
plugin_version = config.get_value("plugin","version")
|
||||||
Version.set_text("v"+plugin_version)
|
Version.set_text("v"+plugin_version)
|
||||||
print(plugin_version)
|
|
||||||
|
|
||||||
func create_selected_file():
|
func create_selected_file():
|
||||||
update_list()
|
update_list()
|
||||||
|
@ -3,7 +3,6 @@ extends Node
|
|||||||
|
|
||||||
const lastopenedfile_path : String = "res://addons/file-editor/lastopenedfiles.lastcfg"
|
const lastopenedfile_path : String = "res://addons/file-editor/lastopenedfiles.lastcfg"
|
||||||
|
|
||||||
var editor_plugin : EditorPlugin = EditorPlugin.new()
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pass
|
pass
|
||||||
@ -44,4 +43,5 @@ func store_editor_fonts(file_name : String, font_path : String):
|
|||||||
file.save(lastopenedfile_path)
|
file.save(lastopenedfile_path)
|
||||||
|
|
||||||
func get_editor_font():
|
func get_editor_font():
|
||||||
|
var editor_plugin : EditorPlugin = EditorPlugin.new()
|
||||||
return editor_plugin.get_editor_interface().get_editor_settings().get_setting("interface/editor/code_font")
|
return editor_plugin.get_editor_interface().get_editor_settings().get_setting("interface/editor/code_font")
|
||||||
|
Loading…
Reference in New Issue
Block a user