diff options
author | rtk0c <[email protected]> | 2021-06-03 10:06:55 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-06-03 10:06:55 -0700 |
commit | 7a325e1b3be04bc54941431458903022da1643ac (patch) | |
tree | aa76ab5b243fb351693645bfe2d2841019a45c5a /core/src/UI/UI_Templates.cpp | |
parent | 016d58996db755630f8b41ddbef67516fe0c13b2 (diff) |
Create template inheritance hierarchy, object value RTTI system
Diffstat (limited to 'core/src/UI/UI_Templates.cpp')
-rw-r--r-- | core/src/UI/UI_Templates.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/core/src/UI/UI_Templates.cpp b/core/src/UI/UI_Templates.cpp index 082b72a..cf53461 100644 --- a/core/src/UI/UI_Templates.cpp +++ b/core/src/UI/UI_Templates.cpp @@ -29,6 +29,8 @@ class TableTemplateUI : public TemplateUI private: std::unique_ptr<TableTemplate> mTable; + TableCell* mSelectedCell = nullptr; + public: TableTemplateUI(std::unique_ptr<TableTemplate> table) : mTable{ std::move(table) } @@ -51,6 +53,31 @@ public: private: void DrawInspector() { + if (ImGui::BeginTabBar("Inspector")) { + if (ImGui::BeginTabItem("Table")) { + DrawTableInspector(); + ImGui::EndTabItem(); + } + if (ImGui::BeginTabItem("Cell")) { + DrawCellInspector(); + ImGui::EndTabItem(); + } + ImGui::EndTabBar(); + } + } + + void DrawTableInspector() + { + // TODO + } + + void DrawCellInspector() + { + if (mSelectedCell) { + + } else { + ImGui::Text("Select a cell to edit"); + } } void DrawTable() @@ -300,4 +327,8 @@ void UI::TemplatesTab() ImGui::EndPopup(); } + + if (openTemplate) { + openTemplate->Draw(); + } } |