mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-13 22:38:27 +00:00
Update name of variable
This commit is contained in:
parent
cb06358da6
commit
f948e327ca
@ -75,18 +75,18 @@ impl ApplicationHandler for DisplayState {
|
|||||||
_: WindowId,
|
_: WindowId,
|
||||||
event: WindowEvent,
|
event: WindowEvent,
|
||||||
) {
|
) {
|
||||||
let Some(viewer) = &mut self.window else {
|
let Some(window) = &mut self.window else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
let input_event = input_event(&event, self.invert_zoom);
|
let input_event = input_event(&event, self.invert_zoom);
|
||||||
if let Some(input_event) = input_event {
|
if let Some(input_event) = input_event {
|
||||||
viewer.handle_input_event(input_event);
|
window.handle_input_event(input_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
WindowEvent::Resized(size) => {
|
WindowEvent::Resized(size) => {
|
||||||
viewer.on_screen_resize(ScreenSize {
|
window.on_screen_resize(ScreenSize {
|
||||||
width: size.width,
|
width: size.width,
|
||||||
height: size.height,
|
height: size.height,
|
||||||
});
|
});
|
||||||
@ -107,15 +107,15 @@ impl ApplicationHandler for DisplayState {
|
|||||||
event_loop.exit();
|
event_loop.exit();
|
||||||
}
|
}
|
||||||
Key::Character("1") => {
|
Key::Character("1") => {
|
||||||
viewer.toggle_draw_model();
|
window.toggle_draw_model();
|
||||||
}
|
}
|
||||||
Key::Character("2") => {
|
Key::Character("2") => {
|
||||||
viewer.toggle_draw_mesh();
|
window.toggle_draw_mesh();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
WindowEvent::CursorMoved { position, .. } => {
|
WindowEvent::CursorMoved { position, .. } => {
|
||||||
viewer.on_cursor_movement([position.x, position.y]);
|
window.on_cursor_movement([position.x, position.y]);
|
||||||
}
|
}
|
||||||
WindowEvent::MouseInput { state, button, .. } => {
|
WindowEvent::MouseInput { state, button, .. } => {
|
||||||
let button = match button {
|
let button = match button {
|
||||||
@ -129,17 +129,17 @@ impl ApplicationHandler for DisplayState {
|
|||||||
if let Some(button) = button {
|
if let Some(button) = button {
|
||||||
match state {
|
match state {
|
||||||
ElementState::Pressed => {
|
ElementState::Pressed => {
|
||||||
viewer.on_mouse_button_pressed(button);
|
window.on_mouse_button_pressed(button);
|
||||||
}
|
}
|
||||||
ElementState::Released => {
|
ElementState::Released => {
|
||||||
viewer.on_mouse_button_released(button)
|
window.on_mouse_button_released(button)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WindowEvent::MouseWheel { .. } => viewer.add_focus_point(),
|
WindowEvent::MouseWheel { .. } => window.add_focus_point(),
|
||||||
WindowEvent::RedrawRequested => {
|
WindowEvent::RedrawRequested => {
|
||||||
viewer.draw();
|
window.draw();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user