diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-04 15:54:30 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-04 15:54:30 +0200 |
| commit | 2855642dd16cea260f3b32351f0529328a0bcb15 (patch) | |
| tree | a375d2c57e1089ba54746371674e48c9216bb8e4 /src/ui/ui_main.cpp | |
| parent | b8e049f02a16dc8398b2a954b561c84beda423c7 (diff) | |
namespacing locale, config, file_templates
Diffstat (limited to 'src/ui/ui_main.cpp')
| -rw-r--r-- | src/ui/ui_main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/ui_main.cpp b/src/ui/ui_main.cpp index 45b787b..f918ce8 100644 --- a/src/ui/ui_main.cpp +++ b/src/ui/ui_main.cpp @@ -67,7 +67,7 @@ void ui_draw_main() { if (ui_state == main_state::UI_END) ui_set_state(main_state::UI_INVOICES); - // @localize + // @locale::get if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMenu("File")) @@ -107,22 +107,22 @@ void ui_draw_main() float buttonWidth = sidePanelWidth; - if (ImGui::Button(localize("nav.invoices"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_INVOICES); - if (ImGui::Button(localize("nav.expenses"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_EXPENSES); - if (ImGui::Button(localize("nav.contacts"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_CONTACTS); + if (ImGui::Button(locale::get("nav.invoices"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_INVOICES); + if (ImGui::Button(locale::get("nav.expenses"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_EXPENSES); + if (ImGui::Button(locale::get("nav.contacts"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_CONTACTS); static bool reports_opened = true; - if (ImGui::Button(localize("nav.reports"), ImVec2(buttonWidth, 24))) reports_opened = !reports_opened; + if (ImGui::Button(locale::get("nav.reports"), ImVec2(buttonWidth, 24))) reports_opened = !reports_opened; if (reports_opened) { ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(20.0f, 0.0f)); - if (ImGui::Button(localize("nav.reports.results"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_REPORT_RESULTS); - if (ImGui::Button(localize("nav.reports.tax"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_REPORT_TAX); + if (ImGui::Button(locale::get("nav.reports.results"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_REPORT_RESULTS); + if (ImGui::Button(locale::get("nav.reports.tax"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_REPORT_TAX); ImGui::PopStyleVar(); } - if (ImGui::Button(localize("nav.projects"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_PROJECTS); - if (ImGui::Button(localize("nav.settings"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_SETTINGS); + if (ImGui::Button(locale::get("nav.projects"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_PROJECTS); + if (ImGui::Button(locale::get("nav.settings"), ImVec2(buttonWidth, 24))) ui_set_state(main_state::UI_SETTINGS); ImGui::PopStyleColor(1); ImGui::PopStyleVar(3); @@ -154,10 +154,10 @@ void ui_draw_main() char* path = administration_get_file_path(); if (path == NULL) { - ImGui::Text("%s: %s", localize("ui.workingOn"), localize("ui.unsavedProject")); + ImGui::Text("%s: %s", locale::get("ui.workingOn"), locale::get("ui.unsavedProject")); } else { - ImGui::Text("%s: %s", localize("ui.workingOn"), path); + ImGui::Text("%s: %s", locale::get("ui.workingOn"), path); } ImGui::SameLine(); |
