Example #1
0
void BadaAppForm::OnTouchPressed(const Control& source, 
																 const Point& currentPosition, 
																 const TouchEventInfo& touchInfo) {
	Touch touch;
	_touchCount = touch.GetPointCount();
	if (_touchCount > 1) {
		int index = getShortcutIndex();
		_shortcutIndex = (index == -1 ? 0 : index + 1);
		_shortcutTimer = g_system->getMillis();
		
		switch (_shortcutIndex) {
		case SHORTCUT_F5:
			g_system->displayMessageOnOSD(_("Game Menu"));
			break;
			
		case SHORTCUT_ESCAPE:
			g_system->displayMessageOnOSD(_("Escape"));
			break;
			
		default:
			g_system->displayMessageOnOSD(_("Swap Buttons"));
			_shortcutIndex = SHORTCUT_SWAP_MOUSE;
		}
	}	else if (getShortcutIndex() == -1) {
		pushEvent(_buttonState == LeftButton ? Common::EVENT_LBUTTONDOWN : Common::EVENT_RBUTTONDOWN,
							currentPosition);
	}
}