summaryrefslogtreecommitdiff
path: root/examples/ui.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2025-03-23 00:39:30 +0100
committerMitya Selivanov <automainint@guattari.tech>2025-03-23 00:39:30 +0100
commit9e716fef26f8bf871e877b1de6f16b0ed0d9713c (patch)
tree09aaee6c053d5d1055fbefc969791fa3167771f9 /examples/ui.c
parent504fc8344f4c83391ea7755908030413ed04d772 (diff)
downloadreduced_system_layer-9e716fef26f8bf871e877b1de6f16b0ed0d9713c.zip
Fill triangles
Diffstat (limited to 'examples/ui.c')
-rw-r--r--examples/ui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/ui.c b/examples/ui.c
index af9b89d..a7877dc 100644
--- a/examples/ui.c
+++ b/examples/ui.c
@@ -23,7 +23,7 @@ void update_and_render_frame(void) {
vec4_f32 light_red = { 1.f, .5f, .5f, 1.f };
vec4_f32 light_green = { .5f, 1.f, .5f, 1.f };
- fill_rectangle_quick(background, (Box) { 0, 0, g_platform.real_width, g_platform.real_height });
+ fill_rectangle(background, (Box) { 0, 0, g_platform.real_width, g_platform.real_height });
if (g_platform.cursor_x >= 40 && g_platform.cursor_x < 100 && g_platform.cursor_y >= 40 && g_platform.cursor_y < 100) {
button_0_down = g_platform.key_down[BUTTON_LEFT];
@@ -221,9 +221,9 @@ void update_and_render_frame(void) {
text[i] = g_platform.drop_files[0].data[i];
}
- draw_text_cursor((vec4_f32) { 1.f, 1.f, 1.f, 1.f }, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text, cursor, selection);
- draw_text_area((vec4_f32) { 0.f, 0.f, 0.f, 1.f }, (Box) { x0 + 8, y0 - 8, w, h }, (vec2) { 10., 10. }, text_len, text);
- draw_text_area(color, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text);
+ draw_text_cursor_cached((vec4_f32) { 1.f, 1.f, 1.f, 1.f }, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text, cursor, selection);
+ draw_text_area_cached((vec4_f32) { 0.f, 0.f, 0.f, 1.f }, (Box) { x0 + 8, y0 - 8, w, h }, (vec2) { 10., 10. }, text_len, text);
+ draw_text_area_cached(color, (Box) { x0, y0, w, h }, (vec2) { 10., 10. }, text_len, text);
render_main_window_frame();
}