Ejemplo n.º 1
0
/**
 *
 *  rct2: 0x006E8ACB
 */
static void input_scroll_right(sint32 x, sint32 y, sint32 state)
{
	rct_window* w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number);
	if (w == NULL) {
		platform_show_cursor();
		_inputState = INPUT_STATE_RESET;
		return;
	}

	switch (state) {
	case MOUSE_STATE_RELEASED:
		_ticksSinceDragStart += gTicksSinceLastUpdate;
		if (x != 0 || y != 0) {
			_ticksSinceDragStart = 1000;
			input_scroll_drag_continue(x, y, w);
		}
		break;
	case MOUSE_STATE_RIGHT_RELEASE:
		_inputState = INPUT_STATE_RESET;
		platform_show_cursor();
		break;
	}
}
Ejemplo n.º 2
0
/**
 *
 *  rct2: 0x006E8ACB
 */
static void input_scroll_right(int x, int y, int state)
{
	rct_window* w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number);
	if (w == NULL) {
		platform_show_cursor();
		gInputState = INPUT_STATE_RESET;
		return;
	}

	switch (state) {
	case MOUSE_STATE_RELEASED:
		_ticksSinceDragStart += RCT2_GLOBAL(RCT2_ADDRESS_TICKS_SINCE_LAST_UPDATE, sint16);
		if (x != 0 || y != 0) {
			_ticksSinceDragStart = 1000;
			input_scroll_drag_continue(x, y, w);
		}
		break;
	case MOUSE_STATE_RIGHT_RELEASE:
		gInputState = INPUT_STATE_RESET;
		platform_show_cursor();
		break;
	}
}