diff --git a/src/app/editor/editor.h b/src/app/editor/editor.h index fb6b153d..44c72844 100644 --- a/src/app/editor/editor.h +++ b/src/app/editor/editor.h @@ -7,6 +7,7 @@ #include "app/editor/system/command_manager.h" #include "app/editor/system/extension_manager.h" #include "app/editor/system/history_manager.h" +#include "app/editor/system/popup_manager.h" namespace yaze { @@ -20,6 +21,7 @@ struct EditorContext { CommandManager command_manager; ExtensionManager extension_manager; HistoryManager history_manager; + PopupManager popup_manager; }; enum class EditorType { diff --git a/src/app/editor/system/popup_manager.h b/src/app/editor/system/popup_manager.h index e45422c3..7d37e8f7 100644 --- a/src/app/editor/system/popup_manager.h +++ b/src/app/editor/system/popup_manager.h @@ -1,19 +1,26 @@ #ifndef YAZE_APP_EDITOR_POPUP_MANAGER_H #define YAZE_APP_EDITOR_POPUP_MANAGER_H +#include + namespace yaze { namespace editor { +struct PopupParams { + std::string name; +}; + // ImGui popup manager. class PopupManager { public: - PopupManager(); - ~PopupManager(); void Show(const char* name); + + private: + std::vector popups_; }; -} // namespace editor -} // namespace yaze +} // namespace editor +} // namespace yaze -#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H +#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H diff --git a/src/app/editor/system/settings_editor.cc b/src/app/editor/system/settings_editor.cc index 0db8f170..33bd1d64 100644 --- a/src/app/editor/system/settings_editor.cc +++ b/src/app/editor/system/settings_editor.cc @@ -10,24 +10,16 @@ namespace yaze { namespace editor { using ImGui::BeginChild; -using ImGui::BeginMenu; using ImGui::BeginTabBar; using ImGui::BeginTabItem; using ImGui::BeginTable; -using ImGui::Checkbox; using ImGui::EndChild; -using ImGui::EndMenu; using ImGui::EndTabBar; using ImGui::EndTabItem; using ImGui::EndTable; -using ImGui::TableHeader; using ImGui::TableHeadersRow; using ImGui::TableNextColumn; -using ImGui::TableNextRow; -using ImGui::TableSetBgColor; -using ImGui::TableSetColumnIndex; using ImGui::TableSetupColumn; -using ImGui::Text; absl::Status SettingsEditor::Update() { if (BeginTabBar("Settings", ImGuiTabBarFlags_None)) {