From be4d30b208c761363c16592953aaf170fde089cf Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 11 Oct 2025 23:34:02 -0400 Subject: [PATCH] refactor(editor): remove MenuManager class and its associated files - Deleted the MenuManager class implementation and header files from the project. - Updated CMake configuration to reflect the removal of MenuManager, simplifying the editor's UI management. Benefits: - Reduced code complexity by eliminating unused components. - Improved maintainability of the editor's UI structure. --- src/app/editor/editor_library.cmake | 1 - src/app/editor/ui/menu_manager.cc | 26 -------------------------- src/app/editor/ui/menu_manager.h | 24 ------------------------ 3 files changed, 51 deletions(-) delete mode 100644 src/app/editor/ui/menu_manager.cc delete mode 100644 src/app/editor/ui/menu_manager.h diff --git a/src/app/editor/editor_library.cmake b/src/app/editor/editor_library.cmake index b3cf0002..af6b2de7 100644 --- a/src/app/editor/editor_library.cmake +++ b/src/app/editor/editor_library.cmake @@ -47,7 +47,6 @@ set( app/editor/ui/background_renderer.cc app/editor/ui/editor_selection_dialog.cc app/editor/ui/menu_builder.cc - app/editor/ui/menu_manager.cc app/editor/ui/welcome_screen.cc app/editor/ui/workspace_manager.cc ) diff --git a/src/app/editor/ui/menu_manager.cc b/src/app/editor/ui/menu_manager.cc deleted file mode 100644 index 5bdc8ef9..00000000 --- a/src/app/editor/ui/menu_manager.cc +++ /dev/null @@ -1,26 +0,0 @@ -#include "app/editor/ui/menu_manager.h" - -#include "app/editor/editor_manager.h" -#include "app/gui/icons.h" -#include "absl/strings/str_format.h" - -namespace yaze { -namespace editor { - -MenuManager::MenuManager(EditorManager* editor_manager) - : editor_manager_(editor_manager) {} - -void MenuManager::BuildAndDraw() { - if (!editor_manager_) { - return; - } - - if (ImGui::BeginMenuBar()) { - editor_manager_->BuildModernMenu(); - editor_manager_->DrawMenuBarExtras(); - ImGui::EndMenuBar(); - } -} - -} // namespace editor -} // namespace yaze diff --git a/src/app/editor/ui/menu_manager.h b/src/app/editor/ui/menu_manager.h deleted file mode 100644 index 4aba172c..00000000 --- a/src/app/editor/ui/menu_manager.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef YAZE_APP_EDITOR_UI_MENU_MANAGER_H_ -#define YAZE_APP_EDITOR_UI_MENU_MANAGER_H_ - -#include "app/editor/ui/menu_builder.h" - -namespace yaze { -namespace editor { - -class EditorManager; - -class MenuManager { - public: - explicit MenuManager(EditorManager* editor_manager); - - void BuildAndDraw(); - - private: - EditorManager* editor_manager_; -}; - -} // namespace editor -} // namespace yaze - -#endif // YAZE_APP_EDITOR_UI_MENU_MANAGER_H_ \ No newline at end of file