Use Sam's 2d/3d toggle button icons

main
Elijah C. Voigt 2 years ago
parent 79f1e0813d
commit 96c3597c67

BIN
assets/images/2DIcon.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/images/2d-icon.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/images/3DIcon.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/images/3d-icon.png (Stored with Git LFS)

Binary file not shown.

@ -29,7 +29,6 @@ fn initialize(mut commands: Commands) {
.spawn((
NodeBundle {
style: Style {
padding: UiRect::all(Val::Px(10.0)),
position_type: PositionType::Absolute,
right: Val::Px(5.0),
bottom: Val::Px(5.0),
@ -45,7 +44,8 @@ fn initialize(mut commands: Commands) {
parent.spawn((
ButtonBundle {
style: Style {
padding: UiRect::all(Val::Px(10.0)),
width: Val::Px(25.0),
height: Val::Px(25.0),
..default()
},
background_color: Color::WHITE.into(),
@ -83,8 +83,8 @@ fn sync_display_mode(
) {
query.iter_mut().for_each(|(mut image, mut display_state)| {
let (texture, target_state) = match state.get() {
DisplayState::Display2d => (server.load("images/3d-icon.png"), DisplayState::Display3d),
DisplayState::Display3d => (server.load("images/2d-icon.png"), DisplayState::Display2d),
DisplayState::Display2d => (server.load("images/3DIcon.png"), DisplayState::Display3d),
DisplayState::Display3d => (server.load("images/2DIcon.png"), DisplayState::Display2d),
};
*image = UiImage {
texture,

Loading…
Cancel
Save