void BadaAppForm::OnTouchReleased(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) { if (_buttonState != kMoveOnly) { pushEvent(_buttonState == kLeftButton ? Common::EVENT_LBUTTONUP : Common::EVENT_RBUTTONUP, currentPosition); if (_buttonState == kRightButtonOnce) { _buttonState = kLeftButton; } // flick to skip dialog if (touchInfo.IsFlicked()) { pushKey(Common::KEYCODE_PERIOD); } } }
void BadaAppForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) { if (getShortcutIndex() == -1) { pushEvent(_buttonState == LeftButton ? Common::EVENT_LBUTTONUP : Common::EVENT_RBUTTONUP, currentPosition); if (_buttonState == RightButtonOnce) { _buttonState = LeftButton; } // flick to skip dialog if (touchInfo.IsFlicked()) { pushKey(Common::KEYCODE_PERIOD); } } else if (_touchCount == 1) { bool repeat = false; switch (_shortcutIndex) { case SHORTCUT_SWAP_MOUSE: switch (_buttonState) { case LeftButton: _buttonState = RightButtonOnce; g_system->displayMessageOnOSD(_("Right Once")); break; case RightButtonOnce: g_system->displayMessageOnOSD(_("Right Active")); _buttonState = RightButton; break; case RightButton: g_system->displayMessageOnOSD(_("Left Active")); _buttonState = LeftButton; break; } break; case SHORTCUT_F5: pushKey(Common::KEYCODE_F5); break; case SHORTCUT_ESCAPE: pushKey(Common::KEYCODE_ESCAPE); repeat = true; break; } // allow key repeat or terminate setup mode _shortcutTimer = repeat ? g_system->getMillis() : -1; } }