From 7a325e1b3be04bc54941431458903022da1643ac Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 3 Jun 2021 10:06:55 -0700 Subject: Create template inheritance hierarchy, object value RTTI system --- core/src/UI/UI_Templates.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'core/src/UI/UI_Templates.cpp') 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 mTable; + TableCell* mSelectedCell = nullptr; + public: TableTemplateUI(std::unique_ptr 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(); + } } -- cgit v1.2.3-70-g09d2