home *** CD-ROM | disk | FTP | other *** search
- #include "InputDeviceWindowsMouse.h"
- #include "InputManagerPtr.h"
-
- void InputDeviceWindowsMouse::mouse_up(int key)
- {
- String name = (key == 0) ? "Left Button" : "Right Button";
- InputManagerPtr()->add_key_event( InputKeyEvent( get_name(), name, InputKeyEvent::RELEASE ) );
- }
-
- void InputDeviceWindowsMouse::mouse_down(int key)
- {
- String name = (key == 0) ? "Left Button" : "Right Button";
- InputManagerPtr()->add_key_event( InputKeyEvent( get_name(), name, InputKeyEvent::PRESS ) );
- }
-
- void InputDeviceWindowsMouse::mouse_move(int x, int y)
- {
- mouse_x = x;
- mouse_y = y;
- }
-
- String InputDeviceWindowsMouse::get_type()const
- {
- return "Mouse";
- }
-
- String InputDeviceWindowsMouse::get_name()const
- {
- return "Mouse";
- }
-