summaryrefslogtreecommitdiff
path: root/examples/ui.c
diff options
context:
space:
mode:
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 8375e4d..c10a9c6 100644
--- a/examples/ui.c
+++ b/examples/ui.c
@@ -60,11 +60,11 @@ void update_and_render_frame(void) {
f64 x0 = w / 2.0;
f64 y0 = h / 2.0;
- vec3_f32 color = { 1.f, .5f, .5f };
+ vec4_f32 color = { 1.f, .5f, .5f, 1.f };
if (g_platform.cursor_x >= x0 && g_platform.cursor_x < x0 + w &&
g_platform.cursor_y >= y0 && g_platform.cursor_y < y0 + h)
- color = (vec3_f32) { 1.f, 1.f, 1.f };
+ color = (vec4_f32) { 1.f, 1.f, 1.f, 1.f };
for (i64 i = 0; i < g_platform.input_size; ++i)
if (g_platform.input[i].ctrl)
@@ -223,8 +223,8 @@ void update_and_render_frame(void) {
}
draw_text_area(RGB(0.f, 0.f, 0.f), x0 + 8, y0 - 8, w, h, 10., 10., text_len, text);
- draw_text_area((Brush) { .color = with_alpha(color, 1.f) }, x0, y0, w, h, 10., 10., text_len, text);
- draw_text_cursor((Brush) { .xor_color = 1, .color = { 1.f, 1.f, 1.f, 1.f } }, x0, y0, w, h, 10., 10., cursor, selection, text_len, text);
+ draw_text_area((Brush) { .color = color, }, x0, y0, w, h, 10., 10., text_len, text);
+ draw_text_cursor((Brush) { .xor_color = 1, .color = { 1.f, 1.f, 1.f, 1.f }, }, x0, y0, w, h, 10., 10., cursor, selection, text_len, text);
p_render_frame();
}