|
|
|
@ -97,20 +97,24 @@ fn interactive_button(
|
|
|
|
Interaction::None => {
|
|
|
|
Interaction::None => {
|
|
|
|
ui_image.texture = resting_handle.clone();
|
|
|
|
ui_image.texture = resting_handle.clone();
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
while let Some((_t, mut s)) = ts.fetch_next() {
|
|
|
|
while let Some((mut t, mut s)) = ts.fetch_next() {
|
|
|
|
s.right = Val::Auto;
|
|
|
|
s.right = Val::Px(0.0);
|
|
|
|
debug!("TODO: Change text color");
|
|
|
|
s.bottom = Val::Px(0.0);
|
|
|
|
debug!("TODO: Change position");
|
|
|
|
t.sections.iter_mut().for_each(|mut section| {
|
|
|
|
|
|
|
|
section.style.color = Color::WHITE;
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Interaction::Hovered => {
|
|
|
|
Interaction::Hovered => {
|
|
|
|
ui_image.texture = depressed_handle.clone();
|
|
|
|
ui_image.texture = depressed_handle.clone();
|
|
|
|
writer.send(audio::AudioEvent::MenuHover);
|
|
|
|
writer.send(audio::AudioEvent::MenuHover);
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
while let Some((_t, mut s)) = ts.fetch_next() {
|
|
|
|
while let Some((mut t, mut s)) = ts.fetch_next() {
|
|
|
|
s.right = Val::Px(0.0);
|
|
|
|
s.right = Val::Px(-2.0);
|
|
|
|
debug!("TODO: Change text color");
|
|
|
|
s.bottom = Val::Px(-1.0);
|
|
|
|
debug!("TODO: Change position");
|
|
|
|
t.sections.iter_mut().for_each(|mut section| {
|
|
|
|
|
|
|
|
section.style.color = Color::hex("E8E8E8").unwrap();
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Interaction::Pressed => {
|
|
|
|
Interaction::Pressed => {
|
|
|
|
@ -118,9 +122,7 @@ fn interactive_button(
|
|
|
|
writer.send(audio::AudioEvent::MenuSelect);
|
|
|
|
writer.send(audio::AudioEvent::MenuSelect);
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
let mut ts = texts.iter_many_mut(children.iter_descendants(entity));
|
|
|
|
while let Some((_t, mut s)) = ts.fetch_next() {
|
|
|
|
while let Some((_t, mut s)) = ts.fetch_next() {
|
|
|
|
s.right = Val::Px(0.0);
|
|
|
|
// TODO: Change text color
|
|
|
|
debug!("TODO: Change text color");
|
|
|
|
|
|
|
|
debug!("TODO: Change position");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|