Skip to content

Commit

Permalink
Fix bug with parallax wallpaper (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoLR10 authored Nov 5, 2024
1 parent 1db9586 commit 7ba4bce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/menu/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub fn manageBackground(gameState: *GameState) void {
const background = gameState.menu.assets.backgrounds.main.texture;
const fWidth: f32 = @floatFromInt(background.width);
scrolling.* -= 0.25;
if (scrolling.* <= -fWidth * 2) scrolling.* = 0;
if (scrolling.* <= -fWidth) scrolling.* = 0;

rl.drawTextureEx(background, .{ .x = scrolling.*, .y = 0 }, 0, 1, config.ColorPalette.secondary);
rl.drawTextureEx(background, .{ .x = fWidth + scrolling.*, .y = 0 }, 0, 1, config.ColorPalette.secondary);
Expand Down

0 comments on commit 7ba4bce

Please sign in to comment.