本文整理汇总了C++中cegui::Window::deactivate方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::deactivate方法的具体用法?C++ Window::deactivate怎么用?C++ Window::deactivate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::deactivate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Input_InputModeChanged
void ActiveWidgetHandler::Input_InputModeChanged(Input::InputMode mode)
{
if (mode != Input::IM_GUI && mLastMode == Input::IM_GUI) {
//save the current active widget
CEGUI::Window* window = mGuiManager.getMainSheet()->getActiveChild();
if (window) {
mLastActiveWindow = window;
mLastActiveWindowDestructionStartedConnection = window->subscribeEvent(CEGUI::Window::EventDestructionStarted, CEGUI::Event::Subscriber(&ActiveWidgetHandler::lastActiveWindowDestructionStarted, this));
window->deactivate();
//deactivate all parents
while ((window = window->getParent())) {
window->deactivate();
}
} else {
mLastActiveWindow = nullptr;
}
mLastMode = mode;
} else if (mode == Input::IM_GUI) {
if (mLastActiveWindow) {
//restore the previously active widget
try {
mLastActiveWindow->activate();
} catch (...)
{
S_LOG_WARNING("Error when trying to restore previously captured window.");
}
mLastActiveWindow = 0;
mLastActiveWindowDestructionStartedConnection->disconnect();
}
mLastMode = mode;
}
}
示例2: windowMouseButtonDown
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;
}
示例3: windowMouseButtonDown
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;
}