Move menu to left
This commit is contained in:
parent
a6492622b6
commit
ba5b31275d
|
@ -48,12 +48,13 @@ pub trait FixedWidth {
|
|||
}
|
||||
|
||||
pub struct MainMenu {
|
||||
pub menu: SlotMenu<RoundButton>,
|
||||
pub menu: Offset<SlotMenu<RoundButton>>,
|
||||
pub inventory: Reveal<Offset<TabMenu>>,
|
||||
pub settings: Reveal<Offset<SettingsMenu>>,
|
||||
}
|
||||
|
||||
impl MainMenu {
|
||||
pub const POSITION_X: f32 = -0.40;
|
||||
pub const SUBMENU_SPACING: f32 = 0.1;
|
||||
}
|
||||
|
||||
|
@ -73,7 +74,10 @@ impl Default for MainMenu {
|
|||
buttons.push(button);
|
||||
}
|
||||
|
||||
let submenu_spacing_right = Vec2::new(Self::SUBMENU_SPACING, 0.0);
|
||||
let menu = SlotMenu::new(buttons, 0.18);
|
||||
let menu = Offset::new(menu, Vec2::new(Self::POSITION_X, 0.0));
|
||||
|
||||
let submenu_spacing_right = Vec2::new(Self::SUBMENU_SPACING + Self::POSITION_X, 0.0);
|
||||
let reveal_slide = -0.02;
|
||||
let reveal_duration = 0.1;
|
||||
|
||||
|
@ -86,7 +90,7 @@ impl Default for MainMenu {
|
|||
let settings = Reveal::new(settings, reveal_slide, reveal_duration);
|
||||
|
||||
Self {
|
||||
menu: SlotMenu::new(buttons, 0.18),
|
||||
menu,
|
||||
inventory,
|
||||
settings,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue