当前位置: 首页>>代码示例>>C++>>正文


C++ UIControl::GetParent方法代码示例

本文整理汇总了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);
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例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;
        }
    }
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:40,代码来源:

示例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();
        }
    }
}
开发者ID:dima-belsky,项目名称:dava.framework,代码行数:24,代码来源:ComboBox.cpp

示例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);
}
开发者ID:droidenko,项目名称:dava.framework,代码行数:24,代码来源:EditorBodyControl.cpp


注:本文中的UIControl::GetParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。