feat: Add text UI component (#56)

This commit is contained in:
demenik
2025-11-28 15:48:59 +01:00
parent 2d0f51ff3d
commit 96c76da7f6
10 changed files with 56 additions and 109 deletions

View File

@@ -33,11 +33,7 @@ pub fn open_settings(commands: &mut Commands) {
..Node::hstack(px(20))
},
children![
(
Text::new("Spiel Einstellungen"),
TextFont::from_font_size(40.0),
TextColor(Color::WHITE),
),
text("Spiel Einstellungen", 40.0, Color::WHITE),
pill_button(
ButtonType::SettingsClose,
ButtonVariant::Destructive,
@@ -89,16 +85,12 @@ pub fn open_settings(commands: &mut Commands) {
..Node::vstack(px(10))
},
children![
(
Text::new("Timer Einstellungen"),
TextFont::from_font_size(18.0),
TextColor(Color::WHITE),
text("Spiel Einstellungen", 18.0, Color::WHITE),
text(
"Tipp: Benutze [Umstellen] um in 10er Schritten zu inkrementieren oder dekrementieren!",
16.0,
Color::WHITE
),
(
Text::new("Tipp: Benutze [Umstellen] um in 10er Schritten zu inkrementieren oder dekrementieren!"),
TextFont::from_font_size(16.0),
TextColor(Color::WHITE)
)
]
),
(
@@ -107,11 +99,7 @@ pub fn open_settings(commands: &mut Commands) {
..Node::vstack(px(10))
},
children![
(
Text::new("Fokus Phase"),
TextFont::from_font_size(12.0),
TextColor(Color::WHITE)
),
text("Fokus Phase", 12.0, Color::WHITE),
timer_settings(TimerType::Focus)
]
),
@@ -121,11 +109,7 @@ pub fn open_settings(commands: &mut Commands) {
..Node::vstack(px(10))
},
children![
(
Text::new("Kurze Pause"),
TextFont::from_font_size(12.0),
TextColor(Color::WHITE)
),
text("Kurze Pause", 12.0, Color::WHITE),
timer_settings(TimerType::ShortBreak)
]
),
@@ -135,11 +119,7 @@ pub fn open_settings(commands: &mut Commands) {
..Node::vstack(px(10))
},
children![
(
Text::new("Lange Pause"),
TextFont::from_font_size(12.0),
TextColor(Color::WHITE)
),
text("Lange Pause", 12.0, Color::WHITE),
timer_settings(TimerType::LongBreak)
]
)