From 2cf031b91d5248561fbeff78ceccb0b2d6c73809 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 9 Aug 2025 11:18:02 +0200 Subject: refactors, working on settings view --- src/ui/ui_projects.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui/ui_projects.cpp') diff --git a/src/ui/ui_projects.cpp b/src/ui/ui_projects.cpp index 9490254..a349814 100644 --- a/src/ui/ui_projects.cpp +++ b/src/ui/ui_projects.cpp @@ -5,11 +5,17 @@ #include "administration.hpp" #include "locales.hpp" -static view_state current_view_state = LIST; +static view_state current_view_state = view_state::LIST; static project selected_for_cancellation; static project active_project; +void ui_setup_projects() +{ + current_view_state = view_state::LIST; + memset(&active_project, 0, sizeof(contact)); +} + static void draw_project_form() { static const char* selected_country = NULL; @@ -34,7 +40,7 @@ static void draw_project_form() ImGui::SetNextItemWidth(widthAvailable*0.5f); ImGui::InputTextWithHint(localize("project.form.description"), localize("project.form.description"), active_project.description, IM_ARRAYSIZE(active_project.description)); - ImGui::SameLine();view_draw_required_tag(); + ImGui::SameLine();ui_helper_draw_required_tag(); if (viewing_only) ImGui::EndDisabled(); -- cgit v1.2.3-70-g09d2