summaryrefslogtreecommitdiff
path: root/core/src/UI
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-05-09 16:37:42 -0700
committerrtk0c <[email protected]>2021-05-09 16:37:42 -0700
commita96761a29e9ff67b1756020f87deabc79f635b79 (patch)
tree72d65a8b6f11f745c9e827581c375668932fd69f /core/src/UI
parent97758d5c47698339cfcb9037e477ff463f97b58a (diff)
Work on workflow module
Diffstat (limited to 'core/src/UI')
-rw-r--r--core/src/UI/Localization.hpp8
-rw-r--r--core/src/UI/UI_Workflows.cpp27
2 files changed, 34 insertions, 1 deletions
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<WorkflowUI> 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();
+ }
}