comparison examples/example-message/example-message.c @ 635:3cb1860d9f11

rpg: improve message selectable lines
author David Demelier <markand@malikania.fr>
date Tue, 05 Sep 2023 11:51:46 +0200
parents ec334c61bb81
children
comparison
equal deleted inserted replaced
634:3930234ab1f5 635:3cb1860d9f11
205 205
206 static void 206 static void
207 question(void) 207 question(void)
208 { 208 {
209 const char * const text[] = { 209 const char * const text[] = {
210 "Okay, I've understood.", 210 "Do you think you're brave enough to fight this Karen?",
211 "Nevermind, I'll do it again." 211 "Sure I am.",
212 }; 212 "No."
213 struct mlk_message msg = { 213 };
214 .x = MX, 214 struct mlk_message msg = {
215 .y = MY, 215 .x = MX,
216 .w = MW, 216 .y = MY,
217 .lines = text, 217 .w = MW,
218 .linesz = 2, 218 .lines = text,
219 .flags = MLK_MESSAGE_FLAGS_QUESTION 219 .linesz = 3,
220 .selectable = 0x6
220 }; 221 };
221 222
222 mlk_message_query(&msg, NULL, &msg.h); 223 mlk_message_query(&msg, NULL, &msg.h);
223 run(&msg); 224 run(&msg);
224 } 225 }