comparison examples/example-message/example-message.c @ 622:ec334c61bb81

rpg: simplify message
author David Demelier <markand@malikania.fr>
date Tue, 22 Aug 2023 22:25:34 +0200
parents c7664b679a95
children 3cb1860d9f11
comparison
equal deleted inserted replaced
621:eecdf5140245 622:ec334c61bb81
289 { 289 {
290 const char * const text[] = { 290 const char * const text[] = {
291 "This one will destroy your eyes.", 291 "This one will destroy your eyes.",
292 "Because it use a terrible custom theme." 292 "Because it use a terrible custom theme."
293 }; 293 };
294 struct mlk_message_style style = mlk_message_style; 294 struct mlk_message_style style = *mlk_message_style;
295 struct mlk_message msg = { 295 struct mlk_message msg = {
296 .x = MX, 296 .x = MX,
297 .y = MY, 297 .y = MY,
298 .w = MW, 298 .w = MW,
299 .lines = text, 299 .lines = text,
300 .linesz = 2, 300 .linesz = 2,
301 .style = &style 301 .style = &style
302 }; 302 };
303 303
304 style.bg_color = 0xf85d80ff; 304 style.background = 0xf85d80ff;
305 style.border_color = 0xd94a69ff; 305 style.border = 0xd94a69ff;
306 style.text_color = 0xffffffff; 306 style.color = 0xffffffff;
307 307
308 mlk_message_query(&msg, NULL, &msg.h); 308 mlk_message_query(&msg, NULL, &msg.h);
309 run(&msg); 309 run(&msg);
310 } 310 }
311 311