revert small windows cross compilation changes

main
Elijah Voigt 4 months ago
parent f7dfb346ae
commit e7557c67f2

@ -30,7 +30,6 @@ rustflags = [
"link-arg=-fuse-ld=mold" "link-arg=-fuse-ld=mold"
] ]
# for Windows # for Windows
[target.x86_64-pc-windows-msvc] [target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe" linker = "rust-lld.exe"

@ -105,7 +105,8 @@ struct DialogBox;
/// Initialize the UI which consists soley of a dialog box (for now?) /// Initialize the UI which consists soley of a dialog box (for now?)
fn init_ui(mut commands: Commands) { fn init_ui(mut commands: Commands) {
commands.spawn(( commands
.spawn((
DialogBox, DialogBox,
BackgroundColor(BLACK.with_alpha(0.9).into()), BackgroundColor(BLACK.with_alpha(0.9).into()),
Node { Node {
@ -121,7 +122,27 @@ fn init_ui(mut commands: Commands) {
overflow: Overflow::scroll_y(), overflow: Overflow::scroll_y(),
..default() ..default()
}, },
)); ))
.observe(hover_dialog_box_over)
.observe(hover_dialog_box_out);
}
fn hover_dialog_box_over(
trigger: Trigger<Pointer<Over>>,
mut query: Query<&mut BackgroundColor, With<DialogBox>>,
) {
if let Ok(mut bg) = query.get_mut(trigger.target()) {
bg.0.set_alpha(0.95);
}
}
fn hover_dialog_box_out(
trigger: Trigger<Pointer<Out>>,
mut query: Query<&mut BackgroundColor, With<DialogBox>>,
) {
if let Ok(mut bg) = query.get_mut(trigger.target()) {
bg.0.set_alpha(0.9);
}
} }
/// On startup move the camera to a suitable position /// On startup move the camera to a suitable position
@ -226,17 +247,15 @@ fn choose_dialog_option(
fn hover_dialog_option_over( fn hover_dialog_option_over(
trigger: Trigger<Pointer<Over>>, trigger: Trigger<Pointer<Over>>,
mut query: Query<&mut TextColor>, mut query: Query<(&mut TextColor, &mut BackgroundColor)>,
) { ) {
if let Ok(mut tc) = query.get_mut(trigger.target()) { if let Ok((mut tc, mut bg)) = query.get_mut(trigger.target()) {
*tc = TextColor(DARK_ORANGE.into()); *tc = TextColor(DARK_ORANGE.into());
bg.set_alpha(1.0);
} }
} }
fn hover_dialog_option_out( fn hover_dialog_option_out(trigger: Trigger<Pointer<Out>>, mut query: Query<&mut TextColor>) {
trigger: Trigger<Pointer<Out>>,
mut query: Query<&mut TextColor>,
) {
if let Ok(mut tc) = query.get_mut(trigger.target()) { if let Ok(mut tc) = query.get_mut(trigger.target()) {
*tc = TextColor(ORANGE.into()); *tc = TextColor(ORANGE.into());
} }

Loading…
Cancel
Save