Use type MouseButton instead of glutin::MouseButton

Former-commit-id: 7fc8b2f3f42ed45455feaa4a36e225a981b768ac
This commit is contained in:
timokoesters 2019-05-25 14:53:44 +02:00
parent f4434013db
commit 075c0d9e11
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#![feature(drain_filter)]
#![feature(type_alias_enum_variants)]
#![recursion_limit = "2048"]
#[macro_use]

View File

@ -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))
}