Skip to content

Commit 7d2a77e

Browse files
committed
Use same height for bottom bar in and out of game
1 parent 8065a8e commit 7d2a77e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ enum Collider {
328328
struct ColliderLayer(u32);
329329

330330
const GRID_SIZE: f32 = 48.0;
331-
const BOTTOM_BAR_HEIGHT: f32 = 70.0;
331+
pub const BOTTOM_BAR_HEIGHT: f32 = 70.0;
332332
const LAYER_TWO_MULTIPLIER: f32 = 2.0;
333333
const LAYER_THREE_MULTIPLIER: f32 = 4.0;
334334

src/ui/level_select.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use crate::{level::Level, loading::NUM_LEVELS, save::BestScores, theme, GameState, Handles};
1+
use crate::{
2+
level::Level, loading::NUM_LEVELS, save::BestScores, theme, GameState, Handles,
3+
BOTTOM_BAR_HEIGHT,
4+
};
25

36
use bevy::prelude::*;
47

@@ -72,6 +75,7 @@ fn level_select_enter(mut commands: Commands, best_scores: Res<BestScores>, hand
7275
.spawn((
7376
Node {
7477
width: Val::Percent(100.),
78+
height: Val::Px(BOTTOM_BAR_HEIGHT),
7579
flex_shrink: 0.0,
7680
flex_direction: FlexDirection::Row,
7781
align_items: AlignItems::Center,

0 commit comments

Comments
 (0)