1 #include <msp/graphics/window_private.h>
8 void Mouse::input_event(const Graphics::Window::Event &event)
10 switch(event.xevent.type)
14 set_button_state(event.xevent.xbutton.button, event.xevent.type==ButtonPress, true);
17 set_axis_value(MOUSE_X_AXIS, event.xevent.xmotion.x*2.0/window.get_width()-1.0, true);
18 set_axis_value(MOUSE_Y_AXIS, 1.0-event.xevent.xmotion.y*2.0/window.get_height(), true);