From a96761a29e9ff67b1756020f87deabc79f635b79 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 9 May 2021 16:37:42 -0700 Subject: Work on workflow module --- core/src/UI/Localization.hpp | 8 ++++++++ core/src/UI/UI_Workflows.cpp | 27 ++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'core/src/UI') diff --git a/core/src/UI/Localization.hpp b/core/src/UI/Localization.hpp index 46cf740..65fcdfd 100644 --- a/core/src/UI/Localization.hpp +++ b/core/src/UI/Localization.hpp @@ -19,6 +19,7 @@ public: BasicTranslation Add{ "Generic.Add"sv }; BasicTranslation Edit{ "Generic.Edit"sv }; BasicTranslation Delete{ "Generic.Delete"sv }; + BasicTranslation Close{ "Generic.Close"sv }; BasicTranslation DialogConfirm{ "Generic.Dialog.Confirm"sv }; BasicTranslation DialogCancel{ "Generic.Dialog.Cancel"sv }; @@ -100,4 +101,11 @@ public: BasicTranslation EmptyItemNameError{ "Item.EmptyNameError"sv }; BasicTranslation DuplicateItemNameError{ "Item.DuplicateNameError"sv }; + + /* Workflow tab */ + + BasicTranslation OpenWorkflow{ "Workflow.Open"sv }; + BasicTranslation OpenWorkflowDialogTitle{ "Workflow.Open.DialogTitle"sv }; + BasicTranslation ManageWorkflows{ "Workflow.Manage"sv }; + BasicTranslation ManageWorkflowsDialogTitle{ "Workflow.Manage.DialogTitle"sv }; }; diff --git a/core/src/UI/UI_Workflows.cpp b/core/src/UI/UI_Workflows.cpp index 108410c..f9857a1 100644 --- a/core/src/UI/UI_Workflows.cpp +++ b/core/src/UI/UI_Workflows.cpp @@ -178,6 +178,31 @@ public: void UI::WorkflowsTab() { + auto ls = LocaleStrings::Instance.get(); + static std::unique_ptr openWorkflow; - // TODO + + if (ImGui::Button(ls->Close.Get(), openWorkflow == nullptr)) { + openWorkflow = nullptr; + } + ImGui::SameLine(); + if (ImGui::Button(ls->OpenWorkflow.Get())) { + ImGui::OpenPopup(ls->OpenWorkflowDialogTitle.Get()); + } + if (ImGui::BeginPopupModal(ls->OpenWorkflowDialogTitle.Get())) { + // TODO + ImGui::EndPopup(); + } + ImGui::SameLine(); + if (ImGui::Button(ls->ManageWorkflows.Get())) { + ImGui::OpenPopup(ls->ManageWorkflowsDialogTitle.Get()); + } + if (ImGui::BeginPopupModal(ls->ManageWorkflowsDialogTitle.Get())) { + // TODO + ImGui::EndPopup(); + } + + if (openWorkflow) { + openWorkflow->Draw(); + } } -- cgit v1.2.3-70-g09d2