diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-07-27 13:26:57 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-07-27 13:26:57 +0300 |
| commit | 993cb00f1b13e6a0575ebcf6b8562068fd615f59 (patch) | |
| tree | ed5c30e522d345148ecda1759bd29157eb27c314 | |
| parent | 97ae5428195ca3ad471b56f76b8d14c5625d4dbb (diff) | |
Added retry button
| -rw-r--r-- | src/main.zig | 21 |
1 files 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, ), |
