本文整理汇总了C++中CGUIControl::getHovered方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIControl::getHovered方法的具体用法?C++ CGUIControl::getHovered怎么用?C++ CGUIControl::getHovered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIControl
的用法示例。
在下文中一共展示了CGUIControl::getHovered方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processLogic
void CGUIDialog::processLogic()
{
// For the special effect not used in the galaxy engine
if( g_pBehaviorEngine->getEngine() != ENGINE_GALAXY )
{
if( mFXhStep > 0 )
{
mFXhStep--;
return;
}
else if( mFXvStep > 0 )
{
mFXvStep--;
return;
}
}
// Try to get a control that is waiting for input to be typed
CGUIInputText *pInputCtrl = nullptr;
for( auto &it : mControlList )
{
CGUIControl *ctrl = it.get();
pInputCtrl = dynamic_cast<CGUIInputText*>(ctrl);
if(pInputCtrl)
{
if(pInputCtrl->Typing())
break;
pInputCtrl = nullptr;
}
}
if(pInputCtrl != nullptr)
{
pInputCtrl->processLogic();
}
else
{
// Process the subcontrols its logic
int sel = 0;
for( auto &it : mControlList )
{
CGUIControl *ctrl = it.get();
ctrl->processLogic();
if( dynamic_cast<CGUIButton*>(ctrl) || dynamic_cast<CGUIInputText*>(ctrl) )
{
if( ctrl->getHovered() )
{
mpCurrentCtrl = ctrl;
mSelection = sel;
}
}
sel++;
}
}
if(!g_pInput->m_EventList.empty())
g_pInput->m_EventList.clear();
}
示例2: processLogic
void CGUIDialog::processLogic()
{
// Render the stuff
g_pVideoDriver->mDrawTasks.add( new DrawGUIRenderTask(this) );
// Prepare the subcontrols for rendering
int sel = 0;
for( auto &it : mControlList )
{
CGUIControl *ctrl = it.get();
ctrl->processLogic();
if( dynamic_cast<CGUIButton*>(ctrl) || dynamic_cast<CGUIInputText*>(ctrl) )
{
if( ctrl->getHovered() )
{
mpCurrentCtrl = ctrl;
mSelection = sel;
}
}
sel++;
}
if(!g_pInput->m_EventList.empty())
g_pInput->m_EventList.clear();
}