1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Use new type Pos2 for positions (points) instead of Vec2

This commit is contained in:
Emil Ernerfeldt
2020-04-19 01:05:49 +02:00
parent 6eb1053c35
commit 2170081221
11 changed files with 157 additions and 81 deletions

View File

@@ -6,7 +6,7 @@ use {
emigui::{
example_app::ExampleApp,
label,
math::vec2,
math::*,
widgets::{Button, Label},
Align, Emigui, Window,
},
@@ -63,7 +63,7 @@ fn main() {
raw_input.mouse_down = state == glutin::ElementState::Pressed;
}
glutin::WindowEvent::CursorMoved { position, .. } => {
raw_input.mouse_pos = Some(vec2(position.x as f32, position.y as f32));
raw_input.mouse_pos = Some(pos2(position.x as f32, position.y as f32));
}
glutin::WindowEvent::KeyboardInput { input, .. } => {
if input.virtual_keycode == Some(glutin::VirtualKeyCode::Q)