Some other bullshit

This commit is contained in:
2026-09-12 14:55:40 +02:00
parent 74a635785e
commit 6e01147125
21 changed files with 206 additions and 89 deletions
+9 -8
View File
@@ -7,16 +7,13 @@ use crate::menus::style::FGUiStyle;
#[derive(Component, Clone)]
pub struct CharacterSelectToken {
pub slot: usize,
pub cursor: Entity
pub cursor: Entity,
}
impl CharacterSelectToken {
pub fn create(cursor: Entity, slot: usize, style: &FGUiStyle) -> impl Bundle {
(
CharacterSelectToken {
slot,
cursor
},
CharacterSelectToken { slot, cursor },
Pickable::IGNORE,
Node {
position_type: PositionType::Absolute,
@@ -26,9 +23,13 @@ impl CharacterSelectToken {
},
ImageNode {
image: style.css_token.handle.handle.clone(),
color: style.player_colors.get(slot).copied().unwrap_or(Color::WHITE),
color: style
.player_colors
.get(slot)
.copied()
.unwrap_or(Color::WHITE),
..default()
}
},
)
}
}
}