From 5d34aff5888d3f0c624251f15bedb96c347978d6 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 9 Aug 2025 08:33:08 +0200 Subject: refactors --- src/views/views.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/views/views.cpp (limited to 'src/views/views.cpp') diff --git a/src/views/views.cpp b/src/views/views.cpp deleted file mode 100644 index 47eff34..0000000 --- a/src/views/views.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "views.hpp" -#include "imgui.h" -#include "../locales/locales.hpp" - -void view_draw_required_tag() -{ - ImDrawList* draw_list = ImGui::GetWindowDrawList(); - - const char* text = localize("form.required"); - ImVec2 text_pos = ImGui::GetCursorScreenPos(); - ImVec2 text_size = ImGui::CalcTextSize(text); - text_pos.y += text_size.y/4.0f; - - ImVec4 bg_color = ImVec4(0.9f, 0.235f, 0.235f, 0.4f); // Red background - ImVec4 text_color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // White text - float rounding = 2.0f; - float padding = 2.0f; - - // Background rectangle - ImVec2 bg_min = ImVec2(text_pos.x - padding, text_pos.y - padding); - ImVec2 bg_max = ImVec2(text_pos.x + text_size.x + padding, text_pos.y + text_size.y + padding); - draw_list->AddRectFilled(bg_min, bg_max, ImColor(bg_color), rounding); - - // Foreground text - ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::TextUnformatted(text); - ImGui::PopStyleColor(); -} \ No newline at end of file -- cgit v1.2.3-70-g09d2