You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Multiple scene editing *POTENTIALLY UNSTABLE*
-ability to edit multiple scenes at the same time -resource internal IDs are now persistent, this makes multiple scene editing possible but maaaaay result in file corruption bugs (tested and could not find anything but possibility exists because core code changed, report immediately if you find this). -properly save settings, layout, etc when edited -script editing is independent from scene editing now -show a yellow box when a script belongs to the scene
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include "script_language.h"
|
||||
#include "tools/editor/code_editor.h"
|
||||
#include "scene/gui/split_container.h"
|
||||
|
||||
#include "scene/gui/item_list.h"
|
||||
|
||||
class ScriptEditorQuickOpen : public ConfirmationDialog {
|
||||
|
||||
@@ -88,6 +88,7 @@ protected:
|
||||
virtual void _code_complete_script(const String& p_code, List<String>* r_options);
|
||||
virtual void _load_theme_settings();
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
|
||||
public:
|
||||
@@ -97,7 +98,8 @@ public:
|
||||
Vector<String> get_functions() ;
|
||||
void set_edited_script(const Ref<Script>& p_script);
|
||||
void reload_text();
|
||||
void _update_name();
|
||||
String get_name() ;
|
||||
Ref<Texture> get_icon() ;
|
||||
|
||||
ScriptTextEditor();
|
||||
|
||||
@@ -115,6 +117,7 @@ class ScriptEditor : public VBoxContainer {
|
||||
FILE_SAVE,
|
||||
FILE_SAVE_AS,
|
||||
FILE_SAVE_ALL,
|
||||
FILE_CLOSE,
|
||||
EDIT_UNDO,
|
||||
EDIT_REDO,
|
||||
EDIT_CUT,
|
||||
@@ -123,12 +126,12 @@ class ScriptEditor : public VBoxContainer {
|
||||
EDIT_SELECT_ALL,
|
||||
EDIT_COMPLETE,
|
||||
EDIT_AUTO_INDENT,
|
||||
EDIT_TOGGLE_COMMENT,
|
||||
EDIT_MOVE_LINE_UP,
|
||||
EDIT_MOVE_LINE_DOWN,
|
||||
EDIT_INDENT_RIGHT,
|
||||
EDIT_INDENT_LEFT,
|
||||
EDIT_CLONE_DOWN,
|
||||
EDIT_TOGGLE_COMMENT,
|
||||
EDIT_MOVE_LINE_UP,
|
||||
EDIT_MOVE_LINE_DOWN,
|
||||
EDIT_INDENT_RIGHT,
|
||||
EDIT_INDENT_LEFT,
|
||||
EDIT_CLONE_DOWN,
|
||||
SEARCH_FIND,
|
||||
SEARCH_FIND_NEXT,
|
||||
SEARCH_REPLACE,
|
||||
@@ -140,8 +143,7 @@ class ScriptEditor : public VBoxContainer {
|
||||
DEBUG_BREAK,
|
||||
DEBUG_CONTINUE,
|
||||
DEBUG_SHOW,
|
||||
HELP_CONTEXTUAL,
|
||||
WINDOW_CLOSE,
|
||||
HELP_CONTEXTUAL,
|
||||
WINDOW_MOVE_LEFT,
|
||||
WINDOW_MOVE_RIGHT,
|
||||
WINDOW_SELECT_BASE=100
|
||||
@@ -151,12 +153,13 @@ class ScriptEditor : public VBoxContainer {
|
||||
MenuButton *file_menu;
|
||||
MenuButton *edit_menu;
|
||||
MenuButton *search_menu;
|
||||
MenuButton *window_menu;
|
||||
MenuButton *debug_menu;
|
||||
MenuButton *help_menu;
|
||||
Timer *autosave_timer;
|
||||
uint64_t idle;
|
||||
|
||||
ItemList *script_list;
|
||||
HSplitContainer *script_split;
|
||||
TabContainer *tab_container;
|
||||
FindReplaceDialog *find_replace_dialog;
|
||||
GotoLineDialog *goto_line_dialog;
|
||||
@@ -171,6 +174,8 @@ class ScriptEditor : public VBoxContainer {
|
||||
|
||||
VSplitContainer *v_split;
|
||||
|
||||
bool restoring_layout;
|
||||
|
||||
String _get_debug_tooltip(const String&p_text,Node *_ste);
|
||||
|
||||
void _resave_scripts(const String& p_str);
|
||||
@@ -180,6 +185,8 @@ class ScriptEditor : public VBoxContainer {
|
||||
|
||||
void _close_current_tab();
|
||||
|
||||
bool grab_focus_block;
|
||||
|
||||
ScriptEditorQuickOpen *quick_open;
|
||||
|
||||
|
||||
@@ -199,6 +206,18 @@ class ScriptEditor : public VBoxContainer {
|
||||
void _editor_settings_changed();
|
||||
void _autosave_scripts();
|
||||
|
||||
void _update_script_names();
|
||||
|
||||
void _script_selected(int p_idx);
|
||||
|
||||
void _find_scripts(Node* p_base, Node* p_current,Set<Ref<Script> >& used);
|
||||
|
||||
void _tree_changed();
|
||||
|
||||
void _script_split_dragged(float);
|
||||
|
||||
bool waiting_update_names;
|
||||
|
||||
static ScriptEditor *script_editor;
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
@@ -206,9 +225,6 @@ protected:
|
||||
public:
|
||||
|
||||
static ScriptEditor *get_singleton() { return script_editor; }
|
||||
void _save_files_state();
|
||||
void _load_files_state();
|
||||
|
||||
|
||||
void ensure_focus_current();
|
||||
void apply_scripts() const;
|
||||
@@ -222,10 +238,13 @@ public:
|
||||
|
||||
void get_breakpoints(List<String> *p_breakpoints);
|
||||
|
||||
void swap_lines(TextEdit *tx, int line1, int line2);
|
||||
void swap_lines(TextEdit *tx, int line1, int line2);
|
||||
|
||||
void save_external_data();
|
||||
|
||||
void set_window_layout(Ref<ConfigFile> p_layout);
|
||||
void get_window_layout(Ref<ConfigFile> p_layout);
|
||||
|
||||
ScriptEditor(EditorNode *p_editor);
|
||||
};
|
||||
|
||||
@@ -254,6 +273,9 @@ public:
|
||||
virtual void restore_global_state();
|
||||
virtual void save_global_state();
|
||||
|
||||
virtual void set_window_layout(Ref<ConfigFile> p_layout);
|
||||
virtual void get_window_layout(Ref<ConfigFile> p_layout);
|
||||
|
||||
virtual void get_breakpoints(List<String> *p_breakpoints);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user