summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-07-27 13:26:57 +0300
committerKyren223 <Kyren223@proton.me>2025-07-27 13:26:57 +0300
commit993cb00f1b13e6a0575ebcf6b8562068fd615f59 (patch)
treeed5c30e522d345148ecda1759bd29157eb27c314 /src/main.zig
parent97ae5428195ca3ad471b56f76b8d14c5625d4dbb (diff)
Added retry button
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig21
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,
),