Some other bullshit
This commit is contained in:
@@ -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()
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user