Mercurial > molko
comparison examples/example-cursor/example-cursor.c @ 508:7f7602bae0bd
examples: minor touches
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 03 Mar 2023 19:45:00 +0100 |
parents | 41267f6e344d |
children | f45a023f6690 |
comparison
equal
deleted
inserted
replaced
507:d49a05e7a5b5 | 508:7f7602bae0bd |
---|---|
40 static enum mlk_window_cursor cursor = MLK_WINDOW_CURSOR_ARROW; | 40 static enum mlk_window_cursor cursor = MLK_WINDOW_CURSOR_ARROW; |
41 | 41 |
42 static struct mlk_label help = { | 42 static struct mlk_label help = { |
43 .x = 10, | 43 .x = 10, |
44 .y = 10, | 44 .y = 10, |
45 .text = help_text, | 45 .text = help_text |
46 .flags = MLK_LABEL_FLAGS_SHADOW | |
47 }; | 46 }; |
48 | 47 |
49 static void | 48 static void |
50 init(void) | 49 init(void) |
51 { | 50 { |
104 static void | 103 static void |
105 draw(struct mlk_state *st) | 104 draw(struct mlk_state *st) |
106 { | 105 { |
107 (void)st; | 106 (void)st; |
108 | 107 |
109 mlk_painter_set_color(0xebede9ff); | 108 mlk_painter_set_color(MLK_EXAMPLE_BG); |
110 mlk_painter_clear(); | 109 mlk_painter_clear(); |
111 mlk_label_draw(&help); | 110 mlk_label_draw(&help); |
112 mlk_painter_present(); | 111 mlk_painter_present(); |
113 } | 112 } |
114 | 113 |