bool CursorWorldListener::windowMouseButtonUp(const CEGUI::EventArgs& args) { if (isInGUIMode()) { if (mMousePressedStart != 0) { if ((Time::currentTimeMillis() - mMousePressedStart) < mClickThresholdMilliseconds) { mMousePressedStart = 0; sendWorldClick(MPT_CLICK, static_cast<const CEGUI::MouseEventArgs&>(args).position); } } } return true; }
bool CursorWorldListener::windowMouseButtonUp(const CEGUI::EventArgs& args) { if (isInGUIMode()) { if (mMousePressedTimeFrame) { if (mMousePressedTimeFrame->isTimeLeft()) { delete mMousePressedTimeFrame; mMousePressedTimeFrame = 0; sendWorldClick(MPT_CLICK, static_cast<const CEGUI::MouseEventArgs&>(args).position); } } } return true; }
bool CursorWorldListener::windowMouseButtonDown(const CEGUI::EventArgs& args) { if (isInGUIMode()) { S_LOG_VERBOSE("Main sheet is capturing input"); CEGUI::Window* aWindow = CEGUI::Window::getCaptureWindow(); if (aWindow) { aWindow->releaseInput(); aWindow->deactivate(); } mMousePressedStart = Time::currentTimeMillis(); sendWorldClick(MPT_PRESS, CEGUI::MouseCursor::getSingleton().getPosition()); } return true; }
bool CursorWorldListener::windowMouseButtonDown(const CEGUI::EventArgs& args) { if (isInGUIMode()) { S_LOG_VERBOSE("Main sheet is capturing input"); CEGUI::Window* aWindow = CEGUI::Window::getCaptureWindow(); if (aWindow) { aWindow->releaseInput(); aWindow->deactivate(); } delete mMousePressedTimeFrame; mMousePressedTimeFrame = new TimeFrame(boost::posix_time::milliseconds(mClickThresholdMilliseconds)); sendWorldClick(MPT_PRESS, CEGUI::MouseCursor::getSingleton().getPosition()); } return true; }
void CursorWorldListener::afterEventProcessing(float timeslice) { if (!mHoverEventSent) { mCursorLingerStart += timeslice * 1000; if (mCursorLingerStart > 500) { sendHoverEvent(); } } if (isInGUIMode()) { if (mMousePressedStart != 0) { if ((Time::currentTimeMillis() - mMousePressedStart) > mClickThresholdMilliseconds) { mMousePressedStart = 0; sendWorldClick(MPT_PRESSED, CEGUI::MouseCursor::getSingleton().getPosition()); } } } }
void CursorWorldListener::afterEventProcessing(float timeslice) { if (!mHoverEventSent) { mCursorLingerStart += timeslice * 1000; if (mCursorLingerStart > 500) { sendHoverEvent(); } } if (isInGUIMode()) { if (mMousePressedTimeFrame) { if (!mMousePressedTimeFrame->isTimeLeft()) { delete mMousePressedTimeFrame; mMousePressedTimeFrame = 0; sendWorldClick(MPT_PRESSED, CEGUI::MouseCursor::getSingleton().getPosition()); } } } }
bool GUIManager::isInMovementKeysMode() const { return mSheet->isCapturedByThis() || !isInGUIMode(); }