summaryrefslogtreecommitdiff
path: root/editor/editor_autoload_settings.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2022-03-10 19:46:31 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2022-03-12 12:57:05 +0300
commit073abe4b9c633a00256957abd7a6352cec1ee0b8 (patch)
tree6094d29365fdcea298092c5a5284f8326c380591 /editor/editor_autoload_settings.h
parentd5076439e44e6eab5732e1d2fc0f30bb6f34e5f9 (diff)
Add "Add Script" option to project autoload settings
Diffstat (limited to 'editor/editor_autoload_settings.h')
-rw-r--r--editor/editor_autoload_settings.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 044eea4245..380cadbebb 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -47,7 +47,8 @@ class EditorAutoloadSettings : public VBoxContainer {
BUTTON_DELETE
};
- String autoload_changed;
+ String path = "res://";
+ String autoload_changed = "autoload_changed";
struct AutoloadInfo {
String name;
@@ -64,17 +65,16 @@ class EditorAutoloadSettings : public VBoxContainer {
List<AutoloadInfo> autoload_cache;
- bool updating_autoload;
- int number_of_autoloads;
+ bool updating_autoload = false;
String selected_autoload;
- Tree *tree;
- LineEdit *autoload_add_name;
- Button *add_autoload;
- LineEdit *autoload_add_path;
- Label *error_message;
- Button *browse_button;
- EditorFileDialog *file_dialog;
+ Tree *tree = nullptr;
+ LineEdit *autoload_add_name = nullptr;
+ Button *add_autoload = nullptr;
+ LineEdit *autoload_add_path = nullptr;
+ Label *error_message = nullptr;
+ Button *browse_button = nullptr;
+ EditorFileDialog *file_dialog = nullptr;
bool _autoload_name_is_valid(const String &p_name, String *r_error = nullptr);
@@ -90,6 +90,8 @@ class EditorAutoloadSettings : public VBoxContainer {
void _autoload_file_callback(const String &p_path);
Node *_create_autoload(const String &p_path);
+ void _script_created(Ref<Script> p_script);
+
Variant get_drag_data_fw(const Point2 &p_point, Control *p_control);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control);