mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use type MouseButton instead of glutin::MouseButton
Former-commit-id: 7fc8b2f3f42ed45455feaa4a36e225a981b768ac
This commit is contained in:
parent
f4434013db
commit
075c0d9e11
@ -1,4 +1,5 @@
|
||||
#![feature(drain_filter)]
|
||||
#![feature(type_alias_enum_variants)]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -3,10 +3,12 @@ use crate::{
|
||||
settings::Settings,
|
||||
ui, Error,
|
||||
};
|
||||
use glutin::{ElementState, MouseButton};
|
||||
use std::collections::HashMap;
|
||||
use vek::*;
|
||||
|
||||
pub type MouseButton = glutin::MouseButton;
|
||||
pub type ElementState = glutin::ElementState;
|
||||
|
||||
pub struct Window {
|
||||
events_loop: glutin::EventsLoop,
|
||||
renderer: Renderer,
|
||||
@ -126,7 +128,7 @@ impl Window {
|
||||
}
|
||||
glutin::WindowEvent::ReceivedCharacter(c) => events.push(Event::Char(c)),
|
||||
glutin::WindowEvent::MouseInput { button, state, .. }
|
||||
if cursor_grabbed && state == ElementState::Pressed =>
|
||||
if cursor_grabbed && state == glutin::ElementState::Pressed =>
|
||||
{
|
||||
events.push(Event::Click(button, state))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user