From 993cb00f1b13e6a0575ebcf6b8562068fd615f59 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 27 Jul 2025 13:26:57 +0300 Subject: Added retry button --- src/main.zig | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main.zig b/src/main.zig index 4e7a47d..cf0c61d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -785,8 +785,7 @@ const ScreenMainMenu = struct { self.updateCamera(); if (self.pressed_start) { - const battle = ScreenBattle.init(); - game.screen_state = .{ .battle = battle }; + game.screen_state = .{ .battle = .init() }; } } @@ -976,7 +975,23 @@ const ScreenGameOver = struct { "Back to main menu", rl.Rectangle.init( (world_width - ScreenGameOver.button_menu_width) / 2, - (world_height - ScreenGameOver.button_menu_height) / 2 + 40, + (world_height - ScreenGameOver.button_menu_height) / 2 + cell_size * 1.25, + ScreenGameOver.button_menu_width, + ScreenGameOver.button_menu_height, + ), + .{ + .font = game.font_title, + .font_size = 10, + .spacing = 5, + }, + ); + self.pressed_retry = labelButton( + game, + &self.camera, + "Retry", + rl.Rectangle.init( + (world_width - ScreenGameOver.button_menu_width) / 2, + (world_height - ScreenGameOver.button_menu_height) / 2 + cell_size * 2.25, ScreenGameOver.button_menu_width, ScreenGameOver.button_menu_height, ), -- cgit v1.3.1