Skip to content

Commit

Permalink
Change preload calls to load
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuren committed Feb 22, 2024
1 parent b0ad63d commit daaac40
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/ExplorerDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var editor_theme : Theme:
set = set_editor_theme

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var background_panel : ColorRect = $Panel
Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/lists/StyleboxListItem.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var selected : bool = false:
set = set_selected

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var stylebox_title : Label = $Layout/StyleboxName
Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func get_plugin_name() -> String:
return plugin_name

func _enter_tree():
dialog_instance = preload("res://addons/explore-editor-theme/ExplorerDialog.tscn").instantiate()
dialog_instance = load("res://addons/explore-editor-theme/ExplorerDialog.tscn").instantiate()
dialog_instance.editor_plugin = self
EditorInterface.get_base_control().add_child(dialog_instance)

Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/tabs/EditorColors.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var _color_map : Dictionary = {}
var _default_type_name : String = "Editor"

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var layout_root : BoxContainer = $Layout
Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/tabs/EditorConstants.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var _constant_map : Dictionary = {}
var _default_type_name : String = "Editor"

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var layout_root : BoxContainer = $Layout
Expand Down
4 changes: 2 additions & 2 deletions addons/explore-editor-theme/tabs/EditorFonts.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var _font_size_map : Dictionary = {}
var _default_size_type_name : String = "EditorFonts"

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var layout_root : BoxContainer = $Layout
Expand Down Expand Up @@ -36,7 +36,7 @@ const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUti
@onready var size_font_code : Control = $Layout/FontSizeView/FontSizePanel/FontSizeCode

# Scene references
var font_item_scene := preload("res://addons/explore-editor-theme/lists/FontListItem.tscn")
var font_item_scene := load("res://addons/explore-editor-theme/lists/FontListItem.tscn")

func _ready() -> void:
_update_theme()
Expand Down
6 changes: 3 additions & 3 deletions addons/explore-editor-theme/tabs/EditorIcons.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ var _icon_map : Dictionary = {}
var _default_type_name : String = "EditorIcons"

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
const _IconSaver := preload("res://addons/explore-editor-theme/ui/IconSaver.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _IconSaver := load("res://addons/explore-editor-theme/ui/IconSaver.gd")

# Node references
@onready var layout_root : BoxContainer = $Layout
Expand All @@ -23,7 +23,7 @@ const _IconSaver := preload("res://addons/explore-editor-theme/ui/IconSaver.gd")
@onready var icon_preview_info : Label = $Layout/IconView/IconPanel/IconPreview/IconPreviewInfo
@onready var icon_title : Label = $Layout/IconView/IconPanel/IconName
@onready var icon_code : Control = $Layout/IconView/IconPanel/IconCode
@onready var icon_saver : _IconSaver = $Layout/IconView/IconPanel/IconSaver
@onready var icon_saver := $Layout/IconView/IconPanel/IconSaver

func _ready() -> void:
_update_theme()
Expand Down
4 changes: 2 additions & 2 deletions addons/explore-editor-theme/tabs/EditorStyleboxes.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var _stylebox_map : Dictionary = {}
var _default_type_name : String = "EditorStyles"

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var layout_root : BoxContainer = $Layout
Expand All @@ -26,7 +26,7 @@ const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUti
@onready var stylebox_inspector : Control = $Layout/StyleboxView/StyleboxPanel/StyleboxInspector

# Scene references
var stylebox_item_scene := preload("res://addons/explore-editor-theme/lists/StyleboxListItem.tscn")
var stylebox_item_scene := load("res://addons/explore-editor-theme/lists/StyleboxListItem.tscn")

func _ready() -> void:
_update_theme()
Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/ui/CodePreview.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
extends VBoxContainer

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var code_input : CodeEdit = $CodeText
Expand Down
2 changes: 1 addition & 1 deletion addons/explore-editor-theme/ui/IconSaver.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var type_name: String = "":
set = set_type_name

# Utils
const _PluginUtils := preload("res://addons/explore-editor-theme/utils/PluginUtils.gd")
var _PluginUtils := load("res://addons/explore-editor-theme/utils/PluginUtils.gd")

# Node references
@onready var save_button: Button = $SaveButton
Expand Down
4 changes: 4 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ run/main_scene="res://addons/explore-editor-theme/ExplorerDialog.tscn"
config/features=PackedStringArray("4.2")
config/icon="res://addons/explore-editor-theme/plugin-icon.png"

[dotnet]

project/assembly_name="Plugin- Editor Theme Explorer"

[editor_plugins]

enabled=PackedStringArray("res://addons/explore-editor-theme/plugin.cfg")
Expand Down

0 comments on commit daaac40

Please sign in to comment.