diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index f48ea71175..f81f17c803 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -1,4 +1,5 @@ #![feature(drain_filter)] +#![feature(type_alias_enum_variants)] #![recursion_limit = "2048"] #[macro_use] diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index 75d33916d2..f0dd30aafb 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -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)) }