Mercurial > molko
comparison examples/example-message/example-message.c @ 485:3ff1fe64d0cd
core: window -> mlk_window
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 28 Feb 2023 08:40:35 +0100 |
parents | ca30ff96bbe0 |
children | d6757c30658e |
comparison
equal
deleted
inserted
replaced
484:f14b8290b3ce | 485:3ff1fe64d0cd |
---|---|
48 static void | 48 static void |
49 init(void) | 49 init(void) |
50 { | 50 { |
51 if (mlk_core_init("fr.malikania", "example-message") < 0 || ui_init() < 0 || rpg_init() < 0) | 51 if (mlk_core_init("fr.malikania", "example-message") < 0 || ui_init() < 0 || rpg_init() < 0) |
52 mlk_panic(); | 52 mlk_panic(); |
53 if (window_open("Example - Message", W, H) < 0) | 53 if (mlk_window_open("Example - Message", W, H) < 0) |
54 mlk_panic(); | 54 mlk_panic(); |
55 } | 55 } |
56 | 56 |
57 static void | 57 static void |
58 quit(void) | 58 quit(void) |
59 { | 59 { |
60 window_finish(); | 60 mlk_window_finish(); |
61 rpg_finish(); | 61 rpg_finish(); |
62 ui_finish(); | 62 ui_finish(); |
63 mlk_core_finish(); | 63 mlk_core_finish(); |
64 } | 64 } |
65 | 65 |
242 } | 242 } |
243 | 243 |
244 static void | 244 static void |
245 smallbottom(void) | 245 smallbottom(void) |
246 { | 246 { |
247 const unsigned int w = window.w / 4; | 247 const unsigned int w = mlk_window.w / 4; |
248 const unsigned int h = MH; | 248 const unsigned int h = MH; |
249 const int x = (window.w / 2) - (w / 2); | 249 const int x = (mlk_window.w / 2) - (w / 2); |
250 const int y = (window.h - h - 10); | 250 const int y = (mlk_window.h - h - 10); |
251 const char * const text[] = { | 251 const char * const text[] = { |
252 "This one is small here." | 252 "This one is small here." |
253 }; | 253 }; |
254 | 254 |
255 struct message msg = { | 255 struct message msg = { |