本文整理汇总了C++中UIControl::GetParent方法的典型用法代码示例。如果您正苦于以下问题:C++ UIControl::GetParent方法的具体用法?C++ UIControl::GetParent怎么用?C++ UIControl::GetParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIControl
的用法示例。
在下文中一共展示了UIControl::GetParent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectControl
void HierarchyTreeController::SelectControl(HierarchyTreeControlNode* control)
{
if (activeControlNodes.find(control) != activeControlNodes.end())
return;
//add selection
activeControlNodes.insert(control);
UIControl* uiControl = control->GetUIObject();
if (uiControl)
{
uiControl->SetDebugDraw(true);
uiControl->SetDebugDrawColor(Color(1.f, 0, 0, 1.f));
//YZ draw parent rect
UIControl* parentUiControl = uiControl->GetParent();
if (parentUiControl)
{
parentUiControl->SetDebugDrawColor(Color(0.55f, 0.55f, 0.55f, 1.f));
parentUiControl->SetDebugDraw(true);
}
}
emit AddSelectedControl(control);
emit SelectedControlNodesChanged(activeControlNodes);
UpdateSelection(control);
}
示例2: OnAlphaAnimationDone
void HintManager::OnAlphaAnimationDone(BaseObject * owner, void * userData, void * callerData)
{
UIControl *hintControl = (UIControl *)userData;
for(Vector<HintControl*>::iterator it = hints.begin(); it != hints.end(); ++it)
{
if((*it) == hintControl && hintControl)
{
if(hintControl->GetParent())
{
hintControl->GetParent()->RemoveControl(hintControl);
}
SafeRelease(hintControl);
hints.erase(it);
break;
}
}
}
示例3: UnselectControl
void HierarchyTreeController::UnselectControl(HierarchyTreeControlNode* control, bool emitSelectedControlNodesChanged)
{
if (activeControlNodes.find(control) == activeControlNodes.end())
return;
//remove selection
activeControlNodes.erase(control);
UIControl* uiControl = control->GetUIObject();
if (uiControl)
{
uiControl->SetDebugDraw(false);
//YZ draw parent rect
UIControl* parentToRemove = uiControl->GetParent();
if (parentToRemove)
{
bool removeParentDraw = true;
for (SELECTEDCONTROLNODES::iterator iter = activeControlNodes.begin(); iter != activeControlNodes.end(); ++iter)
{
HierarchyTreeControlNode* control = (*iter);
UIControl* uiControl = control->GetUIObject();
if (uiControl)
{
UIControl* parentUiControl = uiControl->GetParent();
if (parentToRemove == uiControl ||
parentToRemove == parentUiControl)
{
removeParentDraw = false;
break;
}
}
}
if (removeParentDraw)
parentToRemove->SetDebugDraw(false);
}
}
emit RemoveSelectedControl(control);
if (emitSelectedControlNodesChanged)
emit SelectedControlNodesChanged(activeControlNodes);
}
示例4: Update
void ComboBox::Update(float32 timeElapsed)
{
UIScreen *scr = UIScreenManager::Instance()->GetScreen();
if (list->GetParent() == scr)
{
UIControl *f = UIControlSystem::Instance()->GetFocusedControl();
bool isFocused = false;
if (f == comboButton || f == list)
{
isFocused = true;
}
else
{
if (f && f->GetParent() && f->GetParent()->GetParent() == list)
{
isFocused = true;
}
}
if (!isFocused)
{
Cancel();
}
}
}
示例5: LandscapeEditorStarted
void EditorBodyControl::LandscapeEditorStarted()
{
RemoveControl(modificationPanel);
savedModificatioMode = modificationPanel->IsModificationMode();
UIControl *toolsPanel = currentLandscapeEditor->GetToolPanel();
if(!toolsPanel->GetParent())
{
AddControl(toolsPanel);
}
Entity* sceneNode = FindLandscapeEntity(scene);
if (sceneNode)
{
scene->SetSelection(sceneNode);
SelectNodeAtTree(NULL);
SelectNodeAtTree(sceneNode);
}
landscapeToolsSelection->Show();
ArrowsNode* arrowsNode = GetArrowsNode(false);
if (arrowsNode)
arrowsNode->SetVisible(false);
}