72 lines
2.5 KiB
Rust
72 lines
2.5 KiB
Rust
use crate::features::hud::components::TimerType;
|
|
use crate::features::hud::ui::timer_settings::timer_settings;
|
|
use crate::features::start_screen::components::RootMarker;
|
|
use crate::prelude::*;
|
|
|
|
/// Spawns the settings popup for the start screen.
|
|
pub fn open_settings_menu(commands: &mut Commands) {
|
|
spawn_popup(
|
|
commands,
|
|
RootMarker::Settings,
|
|
"Einstellungen",
|
|
Node {
|
|
width: px(700),
|
|
..default()
|
|
},
|
|
|parent| {
|
|
parent.spawn((
|
|
Node {
|
|
justify_content: JustifyContent::Center,
|
|
..Node::hstack(px(30))
|
|
},
|
|
children![
|
|
(
|
|
Node {
|
|
width: percent(40),
|
|
..Node::vstack(px(10))
|
|
},
|
|
children![
|
|
text("Timer Einstellungen", 18.0, Color::WHITE),
|
|
text(
|
|
"Tipp: Benutze [Umschalt] um in 10er Schritten zu inkrementieren oder dekrementieren!",
|
|
16.0,
|
|
Color::WHITE
|
|
),
|
|
]
|
|
),
|
|
(
|
|
Node {
|
|
align_items: AlignItems::Center,
|
|
..Node::vstack(px(10))
|
|
},
|
|
children![
|
|
text("Fokus Phase", 12.0, Color::WHITE),
|
|
timer_settings(TimerType::Focus)
|
|
]
|
|
),
|
|
(
|
|
Node {
|
|
align_items: AlignItems::Center,
|
|
..Node::vstack(px(10))
|
|
},
|
|
children![
|
|
text("Kurze Pause", 12.0, Color::WHITE),
|
|
timer_settings(TimerType::ShortBreak)
|
|
]
|
|
),
|
|
(
|
|
Node {
|
|
align_items: AlignItems::Center,
|
|
..Node::vstack(px(10))
|
|
},
|
|
children![
|
|
text("Lange Pause", 12.0, Color::WHITE),
|
|
timer_settings(TimerType::LongBreak)
|
|
]
|
|
)
|
|
],
|
|
));
|
|
},
|
|
);
|
|
}
|