@@ -292,7 +292,7 @@ fn handle_window_event(window: &sdl2::video::Window,
292
292
event : sdl2:: event:: Event ) {
293
293
use sdl2:: event:: Event ;
294
294
use sdl2:: keyboard:: Keycode ;
295
- use sdl2:: mouse:: Mouse ;
295
+ use sdl2:: mouse:: MouseButton ;
296
296
use std:: f64:: consts:: PI ;
297
297
298
298
let mouse = window. subsystem ( ) . sdl ( ) . mouse ( ) ;
@@ -326,7 +326,7 @@ fn handle_window_event(window: &sdl2::video::Window,
326
326
ui_container. hover_at ( game, x as f64 , y as f64 , width as f64 , height as f64 ) ;
327
327
}
328
328
}
329
- Event :: MouseButtonUp { mouse_btn : Mouse :: Left , x, y, ..} => {
329
+ Event :: MouseButtonUp { mouse_btn : MouseButton :: Left , x, y, ..} => {
330
330
let ( width, height) = window. size ( ) ;
331
331
332
332
if game. server . is_connected ( ) && !game. focused && !game. screen_sys . is_current_closable ( ) {
@@ -343,7 +343,7 @@ fn handle_window_event(window: &sdl2::video::Window,
343
343
ui_container. click_at ( game, x as f64 , y as f64 , width as f64 , height as f64 ) ;
344
344
}
345
345
}
346
- Event :: MouseButtonDown { mouse_btn : Mouse :: Right , ..} => {
346
+ Event :: MouseButtonDown { mouse_btn : MouseButton :: Right , ..} => {
347
347
if game. focused {
348
348
game. server . on_right_click ( & mut game. renderer ) ;
349
349
}
0 commit comments