zephr/game: various fixes and improvements

- zephr: handle newlines in text
- fix(zephr): don't overflow color channels bytes when multiplying
  colors
- fix(zephr): don't fallback to UI_CONSTRAINT_FIXED when setting the x
  or y constraint to UI_CONSTRAINT_RELATIVE_PIXELS
- game: added how to play dialog
- game: ability to start a new game
This commit is contained in:
2023-12-29 15:12:43 +02:00
parent 31f22a4ba7
commit e543b5f882
8 changed files with 322 additions and 223 deletions
+1
View File
@@ -779,6 +779,7 @@ void zephr_init(const char* font_path, const char* icon_path, const char* window
zephr_ctx->cursors[ZEPHR_CURSOR_HRESIZE] = XCreateFontCursor(x11_display, XC_sb_h_double_arrow);
zephr_ctx->cursors[ZEPHR_CURSOR_VRESIZE] = XCreateFontCursor(x11_display, XC_sb_v_double_arrow);
// non-standard cursors
zephr_ctx->cursors[ZEPHR_CURSOR_DISABLED] = XcursorLibraryLoadCursor(x11_display, "crossed_circle");
x11_get_screen_size(&zephr_ctx->screen_size.width, &zephr_ctx->screen_size.height);