diff options
Diffstat (limited to 'editor/project_manager.h')
-rw-r--r-- | editor/project_manager.h | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/editor/project_manager.h b/editor/project_manager.h index 7ed8df8a9d..ffccac1858 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -41,11 +41,13 @@ class EditorFileDialog; class HFlowContainer; class LineEdit; class LinkButton; +class MarginContainer; class OptionButton; class PanelContainer; class ProjectDialog; class ProjectList; class TabContainer; +class VBoxContainer; class ProjectManager : public Control { GDCLASS(ProjectManager, Control); @@ -65,21 +67,39 @@ class ProjectManager : public Control { void _update_size_limits(); + MarginContainer *root_container = nullptr; Panel *background_panel = nullptr; - Button *about_btn = nullptr; - LinkButton *version_btn = nullptr; + VBoxContainer *main_vbox = nullptr; - ConfirmationDialog *open_templates = nullptr; - EditorAbout *about = nullptr; + HBoxContainer *title_bar = nullptr; + Button *title_bar_logo = nullptr; + HBoxContainer *main_view_toggles = nullptr; + HBoxContainer *quick_settings_hbox = nullptr; - void _show_about(); - void _version_button_pressed(); + enum MainViewTab { + MAIN_VIEW_PROJECTS, + MAIN_VIEW_ASSETLIB, + MAIN_VIEW_MAX + }; + + MainViewTab current_main_view = MAIN_VIEW_PROJECTS; + HashMap<MainViewTab, Control *> main_view_map; + HashMap<MainViewTab, Button *> main_view_toggle_map; + + PanelContainer *main_view_container = nullptr; + Ref<ButtonGroup> main_view_toggles_group; + + Button *_add_main_view(MainViewTab p_id, const String &p_name, const Ref<Texture2D> &p_icon, Control *p_view_control); + void _set_main_view_icon(MainViewTab p_id, const Ref<Texture2D> &p_icon); + void _select_main_view(int p_id); - TabContainer *tabs = nullptr; VBoxContainer *local_projects_vb = nullptr; EditorAssetLibrary *asset_library = nullptr; - void _on_tab_changed(int p_tab); + ConfirmationDialog *open_templates = nullptr; + EditorAbout *about = nullptr; + + void _show_about(); void _open_asset_library(); // Quick settings. @@ -91,6 +111,12 @@ class ProjectManager : public Control { void _restart_confirm(); void _dim_window(); + // Footer. + + LinkButton *version_btn = nullptr; + + void _version_button_pressed(); + // Project list. ProjectList *_project_list = nullptr; @@ -121,8 +147,6 @@ class ProjectManager : public Control { ConfirmationDialog *multi_open_ask = nullptr; ConfirmationDialog *multi_run_ask = nullptr; - HBoxContainer *settings_hb = nullptr; - AcceptDialog *run_error_diag = nullptr; AcceptDialog *dialog_error = nullptr; ProjectDialog *npdialog = nullptr; |