/* **************************************** * * Event handlers * **************************************** */ void ONScripter::mouseMoveEvent( SDL_MouseMotionEvent *event ) { current_button_state.x = event->x; current_button_state.y = event->y; if ( event_mode & WAIT_BUTTON_MODE ) mouseOverCheck( current_button_state.x, current_button_state.y ); }
/* **************************************** * * Event handlers * **************************************** */ bool ONScripter::mouseMoveEvent( SDL_MouseMotionEvent *event ) { current_button_state.x = event->x * screen_width / screen_device_width; current_button_state.y = event->y * screen_width / screen_device_width; if ( event_mode & WAIT_BUTTON_MODE ){ mouseOverCheck( current_button_state.x, current_button_state.y ); if (getmouseover_flag && current_over_button >= getmouseover_lower && current_over_button <= getmouseover_upper){ current_button_state.button = current_over_button; return true; } } return false; }