diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-09 11:18:02 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-09 11:18:02 +0200 |
| commit | 2cf031b91d5248561fbeff78ceccb0b2d6c73809 (patch) | |
| tree | 0fdd8d1a3aaf3f937b01d708fb334116833fdecb /src/ui/ui_settings.cpp | |
| parent | 432f24319319fe040e142059eb83279c53f90ab8 (diff) | |
refactors, working on settings view
Diffstat (limited to 'src/ui/ui_settings.cpp')
| -rw-r--r-- | src/ui/ui_settings.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ui/ui_settings.cpp b/src/ui/ui_settings.cpp new file mode 100644 index 0000000..81f6d31 --- /dev/null +++ b/src/ui/ui_settings.cpp @@ -0,0 +1,35 @@ +#include "ui.hpp" +#include "imgui.h" +#include "administration.hpp" +#include "locales.hpp" + +extern bool draw_contact_form(contact* buffer, bool back_button_enabled = true, bool viewing_only = false); + +static contact company_info; +void ui_setup_settings() +{ + company_info = administration_get_company_info(); +} + +void ui_draw_settings() +{ + // @localize + if (ImGui::BeginTabBar("SettingsTabBar", 0)) + { + if (ImGui::BeginTabItem("Company")) + { + bool save = draw_contact_form(&company_info, false); + + if (save) { + administration_set_company_info(company_info); + } + ImGui::EndTabItem(); + } + if (ImGui::BeginTabItem("VAT Rates")) + { + ImGui::Text("This is the Broccoli tab!\nblah blah blah blah blah"); + ImGui::EndTabItem(); + } + ImGui::EndTabBar(); + } +}
\ No newline at end of file |
