#include <msp/graphics/window_private.h>
+#include "keys.h"
#include "mouse.h"
namespace Msp {
{
float x = AMotionEvent_getX(event.aevent, pointer_zero);
float y = AMotionEvent_getY(event.aevent, pointer_zero);
- set_axis_value(0, x*2/window.get_width()-1, true);
- set_axis_value(1, 1-y*2/window.get_height(), true);
+ set_axis_value(MOUSE_X_AXIS, x*2/window.get_width()-1, true);
+ set_axis_value(MOUSE_Y_AXIS, 1-y*2/window.get_height(), true);
}
switch(action)
case AMOTION_EVENT_ACTION_POINTER_DOWN:
case AMOTION_EVENT_ACTION_POINTER_UP:
if(action_pointer==0)
- set_button_state(1, action==AMOTION_EVENT_ACTION_DOWN, true);
+ set_button_state(MOUSE_LEFT, action==AMOTION_EVENT_ACTION_DOWN, true);
break;
default:;
}