aboutsummaryrefslogtreecommitdiff
path: root/core/src/UI/UI_Templates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/UI/UI_Templates.cpp')
-rw-r--r--core/src/UI/UI_Templates.cpp31
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();
+ }
}