Add PopupManager: integrate PopupManager class and PopupParams structure for enhanced popup handling
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
#ifndef YAZE_APP_EDITOR_POPUP_MANAGER_H
|
||||
#define YAZE_APP_EDITOR_POPUP_MANAGER_H
|
||||
|
||||
#include <string>
|
||||
|
||||
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<PopupParams> popups_;
|
||||
};
|
||||
|
||||
} // namespace editor
|
||||
} // namespace yaze
|
||||
} // namespace editor
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H
|
||||
#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user