static void motion(struct zr_input *in, SDL_Event *evt) { const zr_int x = evt->motion.x; const zr_int y = evt->motion.y; zr_input_motion(in, x, y); }
static void motion(struct zr_input *in, MSG *msg) { const zr_int x = GET_X_LPARAM(msg->lParam); const zr_int y = GET_Y_LPARAM(msg->lParam); zr_input_motion(in, x, y); }
static void zrmenu_input_mouse_movement(struct zr_context *ctx) { int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS); int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS); zr_input_motion(ctx, mouse_x, mouse_y); zr_input_scroll(ctx, menu_input_mouse_state(MENU_MOUSE_WHEEL_UP) - menu_input_mouse_state(MENU_MOUSE_WHEEL_DOWN)); }