本文整理汇总了C++中Input::ResetMouseVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ Input::ResetMouseVisible方法的具体用法?C++ Input::ResetMouseVisible怎么用?C++ Input::ResetMouseVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Input
的用法示例。
在下文中一共展示了Input::ResetMouseVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetVisible
void Console::SetVisible(bool enable)
{
Input* input = GetSubsystem<Input>();
background_->SetVisible(enable);
closeButton_->SetVisible(enable);
if (enable)
{
// Check if we have receivers for E_CONSOLECOMMAND every time here in case the handler is being added later dynamically
bool hasInterpreter = PopulateInterpreter();
commandLine_->SetVisible(hasInterpreter);
if (hasInterpreter && focusOnShow_)
GetSubsystem<UI>()->SetFocusElement(lineEdit_);
// Ensure the background has no empty space when shown without the lineedit
background_->SetHeight(background_->GetMinHeight());
// Show OS mouse
input->SetMouseVisible(true, true);
}
else
{
rowContainer_->SetFocus(false);
interpreters_->SetFocus(false);
lineEdit_->SetFocus(false);
// Restore OS mouse visibility
input->ResetMouseVisible();
}
}
示例2: SetVisible
void InGameEditor::SetVisible(bool enable)
{
if (enable != rootUI_->IsVisible())
{
Input* input = GetSubsystem<Input>();
rootUI_->SetVisible(enable);
if (enable)
{
// Show OS mouse
input->SetMouseVisible(true, true);
using namespace StartInGameEditor;
VariantMap& newEventData = GetEventDataMap();
SendEvent(E_START_INGAMEEDITOR_, newEventData);
/// Subscribe input events
SubscribeToEvent(E_KEYDOWN, URHO3D_HANDLER(InGameEditor, HandleKeyDown));
SubscribeToEvent(E_KEYUP, URHO3D_HANDLER(InGameEditor, HandleKeyUp));
// Subscribe HandleUpdate() function for processing update events
SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(InGameEditor, HandleUpdate));
SetMainEditor(PluginScene3DEditor::GetTypeStatic());
}
else
{
// Restore OS mouse visibility
input->ResetMouseVisible();
ui_->SetFocusElement(NULL);
using namespace QuitInGameEditor;
VariantMap& newEventData = GetEventDataMap();
SendEvent(E_QUIT_INGAMEEDITOR_, newEventData);
/// Subscribe input events
UnsubscribeFromEvent(E_KEYDOWN);
UnsubscribeFromEvent(E_KEYUP);
UnsubscribeFromEvent(E_UPDATE);
if (mainEditorPlugin_)
{
// mainEditorPlugin_->Leave();
}
}
}
}