本文整理汇总了C++中KeyboardEvent::SetScope方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyboardEvent::SetScope方法的具体用法?C++ KeyboardEvent::SetScope怎么用?C++ KeyboardEvent::SetScope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyboardEvent
的用法示例。
在下文中一共展示了KeyboardEvent::SetScope方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XboxManager
void Event::SysEvent::Loop()
{
_xbox = new XboxManager();
_leap = new LeapManager();
_leap->Connect();
wait_systen();
while (G_GameSettings && G_GameSettings->gameState != Settings::END)
{
if (_ogl->IsInit() && _ogl->IsClose() == false)
{
_sdl = _ogl->GetContext();
_input = _ogl->GetInput();
_ogl->Lock();
_sdl->updateInputs(*_input);
_ogl->Unlock();
_keymanager.updateValue(*_input);
_xbox->Reset();
_xbox->Update();
if (G_EvDispatcher)
{
if (_keymanager.isUpdated() == true)
{
G_EvDispatcher->SendEvent(new KeyboardEvent(_keymanager.getKeyboard()), COMMON);
KeyboardEvent *sysev = new KeyboardEvent(_keymanager.getKeyboard());
sysev->SetScope(ENGINE);
G_EvDispatcher->SendEvent(sysev, SYS);
}
if (_leap->HasUpdate())
G_EvDispatcher->SendEvent(new LeapEvent(_leap->GetLeapData()), COMMON);
if (_xbox->HasUpdate())
G_EvDispatcher->SendEvent(new XboxEvent(_xbox->GetInput(),
_xbox->NumJoystick()),
COMMON);
}
}
usleep(5000);
}
_leap->Disconnect();
delete _xbox;
delete _leap;
}