aboutsummaryrefslogtreecommitdiff
path: root/core/src/UI
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-03-15 22:29:53 -0700
committerrtk0c <[email protected]>2022-03-15 22:29:53 -0700
commitee450783622008698647010540d9b9a9d55cb323 (patch)
tree67088fa2da506a5229fea47b6a812d38b18304a0 /core/src/UI
parent9dcdcf68f6a60741cbdd287e7eda23b4a21a080e (diff)
Temporarily switch to cstdio instead of custom FileStream implementation
Diffstat (limited to 'core/src/UI')
-rw-r--r--core/src/UI/UI_DatabaseView.cpp8
-rw-r--r--core/src/UI/UI_Items.cpp11
-rw-r--r--core/src/UI/UI_MainWindow.cpp8
-rw-r--r--core/src/UI/UI_Templates.cpp8
-rw-r--r--core/src/UI/UI_Workflows.cpp8
5 files changed, 21 insertions, 22 deletions
diff --git a/core/src/UI/UI_DatabaseView.cpp b/core/src/UI/UI_DatabaseView.cpp
index 96ef1d7..e128a59 100644
--- a/core/src/UI/UI_DatabaseView.cpp
+++ b/core/src/UI/UI_DatabaseView.cpp
@@ -16,7 +16,7 @@
#include <memory>
#include <vector>
-namespace {
+namespace CPLT_UNITY_ID {
// TODO move to Settings
constexpr int kMaxEntriesPerPage = 32;
@@ -638,15 +638,15 @@ public:
}
#pragma clang diagnostic pop
};
-} // namespace
+} // namespace CPLT_UNITY_ID
void UI::DatabaseViewTab()
{
auto& gs = GlobalStates::GetInstance();
static Project* currentProject = nullptr;
- static SalesTableView sales;
- static PurchasesTableView purchases;
+ static CPLT_UNITY_ID::SalesTableView sales;
+ static CPLT_UNITY_ID::PurchasesTableView purchases;
if (currentProject != gs.GetCurrentProject()) {
currentProject = gs.GetCurrentProject();
diff --git a/core/src/UI/UI_Items.cpp b/core/src/UI/UI_Items.cpp
index 5b84cb8..a33c61b 100644
--- a/core/src/UI/UI_Items.cpp
+++ b/core/src/UI/UI_Items.cpp
@@ -1,5 +1,4 @@
#include "UI.hpp"
-#include "UI.hpp"
#include "Model/GlobalStates.hpp"
#include "Model/Project.hpp"
@@ -9,7 +8,7 @@
#include <imgui.h>
#include <imgui_stdlib.h>
-namespace {
+namespace CPLT_UNITY_ID {
enum class ActionResult
{
@@ -229,7 +228,7 @@ void ItemListEditor(ItemList<T>& list)
ItemListEntries<T>(list, selectedIdx);
}
-} // namespace
+} // namespace CPLT_UNITY_ID
void UI::ItemsTab()
{
@@ -237,15 +236,15 @@ void UI::ItemsTab()
if (ImGui::BeginTabBar("ItemViewTabs")) {
if (ImGui::BeginTabItem(I18N_TEXT("Products", L10N_ITEM_CATEGORY_PRODUCT))) {
- ItemListEditor(gs.GetCurrentProject()->Products);
+ CPLT_UNITY_ID::ItemListEditor(gs.GetCurrentProject()->Products);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem(I18N_TEXT("Factories", L10N_ITEM_CATEGORY_FACTORY))) {
- ItemListEditor(gs.GetCurrentProject()->Factories);
+ CPLT_UNITY_ID::ItemListEditor(gs.GetCurrentProject()->Factories);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem(I18N_TEXT("Customers", L10N_ITEM_CATEGORY_CUSTOMER))) {
- ItemListEditor(gs.GetCurrentProject()->Customers);
+ CPLT_UNITY_ID::ItemListEditor(gs.GetCurrentProject()->Customers);
ImGui::EndTabItem();
}
ImGui::EndTabBar();
diff --git a/core/src/UI/UI_MainWindow.cpp b/core/src/UI/UI_MainWindow.cpp
index ce6e2e0..d059359 100644
--- a/core/src/UI/UI_MainWindow.cpp
+++ b/core/src/UI/UI_MainWindow.cpp
@@ -13,7 +13,7 @@
namespace fs = std::filesystem;
-namespace {
+namespace CPLT_UNITY_ID {
void ProjectTab_Normal()
{
auto& gs = GlobalStates::GetInstance();
@@ -181,7 +181,7 @@ void ProjectTab_NoProject()
ImGui::EndPopup();
}
}
-} // namespace
+} // namespace CPLT_UNITY_ID
void UI::MainWindow()
{
@@ -199,9 +199,9 @@ void UI::MainWindow()
if (ImGui::BeginTabItem(ICON_FA_FILE " " I18N_TEXT("Project", L10N_MAIN_WINDOW_TAB_PROJECT), nullptr)) {
if (gs.HasCurrentProject()) {
- ProjectTab_Normal();
+ CPLT_UNITY_ID::ProjectTab_Normal();
} else {
- ProjectTab_NoProject();
+ CPLT_UNITY_ID::ProjectTab_NoProject();
}
ImGui::EndTabItem();
}
diff --git a/core/src/UI/UI_Templates.cpp b/core/src/UI/UI_Templates.cpp
index 88ab5fc..cd15cb7 100644
--- a/core/src/UI/UI_Templates.cpp
+++ b/core/src/UI/UI_Templates.cpp
@@ -18,7 +18,7 @@
#include <utility>
#include <variant>
-namespace {
+namespace CPLT_UNITY_ID {
class TemplateUI
{
public:
@@ -925,13 +925,13 @@ std::unique_ptr<TemplateUI> TemplateUI::CreateByKind(Template::Kind kind)
}
return nullptr;
}
-} // namespace
+} // namespace CPLT_UNITY_ID
void UI::TemplatesTab()
{
auto& project = *GlobalStates::GetInstance().GetCurrentProject();
- static std::unique_ptr<TemplateUI> openTemplate;
+ static std::unique_ptr<CPLT_UNITY_ID::TemplateUI> openTemplate;
static AssetList::ListState state;
bool openedDummy = true;
@@ -951,7 +951,7 @@ void UI::TemplatesTab()
ImGui::CloseCurrentPopup();
auto tmpl = project.Templates.Load(*state.SelectedAsset);
- openTemplate = TemplateUI::CreateByKind(std::move(tmpl));
+ openTemplate = CPLT_UNITY_ID::TemplateUI::CreateByKind(std::move(tmpl));
}
ImGui::SameLine();
project.Templates.DisplayControls(state);
diff --git a/core/src/UI/UI_Workflows.cpp b/core/src/UI/UI_Workflows.cpp
index 036e532..c85850a 100644
--- a/core/src/UI/UI_Workflows.cpp
+++ b/core/src/UI/UI_Workflows.cpp
@@ -20,7 +20,7 @@
namespace ImNodes = ax::NodeEditor;
-namespace {
+namespace CPLT_UNITY_ID {
class WorkflowUI
{
private:
@@ -241,13 +241,13 @@ public:
// TODO
}
};
-} // namespace
+} // namespace CPLT_UNITY_ID
void UI::WorkflowsTab()
{
auto& project = *GlobalStates::GetInstance().GetCurrentProject();
- static std::unique_ptr<WorkflowUI> openWorkflow;
+ static std::unique_ptr<CPLT_UNITY_ID::WorkflowUI> openWorkflow;
static AssetList::ListState state;
bool openedDummy = true;
@@ -267,7 +267,7 @@ void UI::WorkflowsTab()
ImGui::CloseCurrentPopup();
auto workflow = project.Workflows.Load(*state.SelectedAsset);
- openWorkflow = std::make_unique<WorkflowUI>(std::move(workflow));
+ openWorkflow = std::make_unique<CPLT_UNITY_ID::WorkflowUI>(std::move(workflow));
}
ImGui::SameLine();
project.Workflows.DisplayControls(state);