From b1b2586afa06105291355a19f581016c347463bc Mon Sep 17 00:00:00 2001 From: physick Date: Tue, 11 Aug 2026 21:08:37 +0500 Subject: arena + dir reading --- src/ui_elements/UI.c | 6 +++--- src/ui_elements/UI.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ui_elements') diff --git a/src/ui_elements/UI.c b/src/ui_elements/UI.c index 9daed74..9f17826 100644 --- a/src/ui_elements/UI.c +++ b/src/ui_elements/UI.c @@ -6,8 +6,8 @@ const int MAX_LINES = 8192; const int SPACING_H = 1; void DrawRecBordered(Rectangle rec, Color bg, Color border_color, int border_width) { - DrawRectangleRounded(rec, 0.015f, 8, bg); - DrawRectangleRoundedLinesEx(rec, 0.015f, 8, border_width, border_color); + DrawRectangleRounded(rec, ROUNDNESS, ROUNDNESS_SEGMENTS, bg); + DrawRectangleRoundedLinesEx(rec, ROUNDNESS, ROUNDNESS_SEGMENTS, border_width, border_color); } float MeasureChar(Font *font, int height, char symbol) { @@ -126,7 +126,7 @@ void DrawPageView(int y, unsigned int pages, unsigned int current_page) { .b = COLORSCHEME_WHITE.b, .a = COLORSCHEME_WHITE.a & PAGE_DOTS_TRANSPARENCY }; - DrawRectangleRounded(rec, 0.15f, 8, color); + DrawRectangleRounded(rec, ROUNDNESS, ROUNDNESS_SEGMENTS, color); int x_pos = (int)rec.x + PAGE_DOTS_PADDING + PAGE_DOTS_RADIUS; int y_pos = (int)rec.y + PAGE_DOTS_PADDING + PAGE_DOTS_RADIUS; diff --git a/src/ui_elements/UI.h b/src/ui_elements/UI.h index 8754329..52d2222 100644 --- a/src/ui_elements/UI.h +++ b/src/ui_elements/UI.h @@ -5,6 +5,9 @@ #ifndef UI_ELEMENTS_H #define UI_ELEMENTS_H +static const float ROUNDNESS = 0.015f; +static const int ROUNDNESS_SEGMENTS = 8; + static const float SCROLL_SENC = 10; static const float TAB_WIDTH = 4; static const int PADDING = 10; @@ -44,6 +47,7 @@ static const int PAGE_DOTS_PADDING = 15; static const int PAGE_DOTS_RADIUS = 3; static const char PAGE_DOTS_TRANSPARENCY = (char)192; +/// Draws the little dots that represent the page you are on void DrawPageView(int y, unsigned int pages, unsigned int current_page); // ========== TEXT EDITOR ========== -- cgit v1.3