diff --git a/addons/file-editor/plugin.cfg b/addons/file-editor/plugin.cfg index 0206c2d..f52a4fb 100644 --- a/addons/file-editor/plugin.cfg +++ b/addons/file-editor/plugin.cfg @@ -3,5 +3,5 @@ name="File Editor" description="An internal file editor to view and edit text files in your project folder." author="Nicolo 'fenix' Santilio" -version="1.7.1" +version="1.7.11" script="scripts/file-editor.gd" diff --git a/addons/file-editor/scenes/FileScene.tscn b/addons/file-editor/scenes/FileScene.tscn index ce17579..54bf071 100644 --- a/addons/file-editor/scenes/FileScene.tscn +++ b/addons/file-editor/scenes/FileScene.tscn @@ -8,8 +8,6 @@ content_margin_left = 10.0 content_margin_right = 10.0 bg_color = Color( 0.145098, 0.172549, 0.231373, 1 ) -[sub_resource type="StyleBoxEmpty" id=9] - [sub_resource type="StyleBoxEmpty" id=2] [sub_resource type="StyleBoxEmpty" id=3] @@ -22,7 +20,9 @@ bg_color = Color( 0.145098, 0.172549, 0.231373, 1 ) [sub_resource type="StyleBoxEmpty" id=7] -[sub_resource type="DynamicFont" id=8] +[sub_resource type="StyleBoxEmpty" id=8] + +[sub_resource type="DynamicFont" id=9] font_data = ExtResource( 2 ) [node name="filename" type="VBoxContainer"] @@ -98,7 +98,7 @@ custom_constants/separation = 2 margin_right = 5.0 margin_bottom = 19.0 rect_min_size = Vector2( 5, 0 ) -custom_styles/separator = SubResource( 9 ) +custom_styles/separator = SubResource( 2 ) [node name="lastmodified_icon" type="TextureRect" parent="FileInfo"] margin_left = 7.0 @@ -124,13 +124,13 @@ margin_left = 939.0 margin_right = 1018.0 margin_bottom = 19.0 size_flags_horizontal = 10 -custom_styles/hover = SubResource( 2 ) -custom_styles/pressed = SubResource( 3 ) -custom_styles/focus = SubResource( 4 ) -custom_styles/disabled = SubResource( 5 ) -custom_styles/hover_pressed = SubResource( 6 ) -custom_styles/normal = SubResource( 7 ) -custom_fonts/font = SubResource( 8 ) +custom_styles/hover = SubResource( 3 ) +custom_styles/pressed = SubResource( 4 ) +custom_styles/focus = SubResource( 5 ) +custom_styles/disabled = SubResource( 6 ) +custom_styles/hover_pressed = SubResource( 7 ) +custom_styles/normal = SubResource( 8 ) +custom_fonts/font = SubResource( 9 ) custom_colors/font_color = Color( 0.145098, 0.172549, 0.231373, 1 ) custom_colors/font_color_pressed = Color( 1, 1, 1, 1 ) text = "Can Edit" diff --git a/addons/file-editor/scripts/CsvEditor.gd b/addons/file-editor/scripts/CsvEditor.gd index 463acfa..34063ca 100644 --- a/addons/file-editor/scripts/CsvEditor.gd +++ b/addons/file-editor/scripts/CsvEditor.gd @@ -1,6 +1,9 @@ tool extends Control +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() + onready var Table = $Editor/TableContainer/ScrollContainer/Table onready var AlignBTN = $Editor/Buttons/align_bt.get_popup() onready var EditBTN = $Editor/Buttons/edit_bt.get_popup() diff --git a/addons/file-editor/scripts/FileEditor.gd b/addons/file-editor/scripts/FileEditor.gd index d1cd02d..7192453 100644 --- a/addons/file-editor/scripts/FileEditor.gd +++ b/addons/file-editor/scripts/FileEditor.gd @@ -20,6 +20,9 @@ onready var SplitEditorContainer = $FileEditorContainer/SplitContainer/EditorCon onready var WrapBTN = $FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer/wrap_button onready var MapBTN = $FileEditorContainer/SplitContainer/EditorContainer/HBoxContainer/map_button +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() + var Preview = preload("res://addons/file-editor/scenes/Preview.tscn") var IniEditor = preload("res://addons/file-editor/scenes/IniEditor.tscn") var VanillaEditor = preload("res://addons/file-editor/scenes/VanillaEditor.tscn") @@ -59,7 +62,10 @@ var current_editor : Control var current_ini_editor : Control var current_csv_editor : Control + + func _ready(): + clean_editor() update_version() connect_signals() diff --git a/addons/file-editor/scripts/FileScene.gd b/addons/file-editor/scripts/FileScene.gd index 66da319..7fbdc1f 100644 --- a/addons/file-editor/scripts/FileScene.gd +++ b/addons/file-editor/scripts/FileScene.gd @@ -1,6 +1,8 @@ tool extends VBoxContainer +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() onready var ReadOnly = $FileInfo/Readonly diff --git a/addons/file-editor/scripts/IniVisualEditor.gd b/addons/file-editor/scripts/IniVisualEditor.gd index 24ceed8..2e8ef45 100644 --- a/addons/file-editor/scripts/IniVisualEditor.gd +++ b/addons/file-editor/scripts/IniVisualEditor.gd @@ -1,6 +1,8 @@ tool extends Control +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() onready var Keys = $VBoxContainer/HSplitContainer/VBoxContainer2/keys onready var Sections = $VBoxContainer/HSplitContainer/VBoxContainer/sections2 diff --git a/addons/file-editor/scripts/Preview.gd b/addons/file-editor/scripts/Preview.gd index 4cd6664..93bbcd4 100644 --- a/addons/file-editor/scripts/Preview.gd +++ b/addons/file-editor/scripts/Preview.gd @@ -1,6 +1,9 @@ tool extends WindowDialog +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() + onready var TextPreview = $Container/TextPreview onready var TablePreview = $Container/TablePreview diff --git a/addons/file-editor/scripts/VanillaEditor.gd b/addons/file-editor/scripts/VanillaEditor.gd index e1fa474..73ca287 100644 --- a/addons/file-editor/scripts/VanillaEditor.gd +++ b/addons/file-editor/scripts/VanillaEditor.gd @@ -1,6 +1,8 @@ tool extends VBoxContainer +var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new() +var LastOpenedFiles = preload("res://addons/file-editor/scripts/LastOpenedFiles.gd").new() onready var ReadOnly = $FileInfo/Readonly