本文整理汇总了C++中UIControl::SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ UIControl::SetVisible方法的具体用法?C++ UIControl::SetVisible怎么用?C++ UIControl::SetVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIControl
的用法示例。
在下文中一共展示了UIControl::SetVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillCell
void DataGraph::FillCell(UIHierarchyCell *cell, void *node)
{
//Temporary fix for loading of UI Interface to avoid reloading of texrures to different formates.
// 1. Reset default format before loading of UI
// 2. Restore default format after loading of UI from stored settings.
Texture::SetDefaultGPU(GPU_UNKNOWN);
DataNode *n = (DataNode *)node;
UIStaticText *text = (UIStaticText *)cell->FindByName("_Text_");
text->SetText(StringToWString(n->GetName()));
UIControl *icon = cell->FindByName("_Icon_");
icon->SetSprite("~res:/Gfx/UI/SceneNode/datanode", 0);
UIControl *marker = cell->FindByName("_Marker_");
marker->SetVisible(false);
if(n == workingNode)
{
cell->SetSelected(true, false);
}
else
{
cell->SetSelected(false, false);
}
Texture::SetDefaultGPU(EditorSettings::Instance()->GetTextureViewGPU());
}
示例2: UIListCell
UIListCell *MaterialEditor::CellAtIndex(UIList *forList, int32 index)
{
UIListCell *c = forList->GetReusableCell("Material name cell");
if (!c)
{
c = new UIListCell(Rect(0, 0, forList->GetRect().dx, 20), "Material name cell");
float32 boxSize = 16;
float32 y = (CellHeight(forList, index) - boxSize) / 2;
float32 x = forList->GetRect().dx - boxSize;
//Temporary fix for loading of UI Interface to avoid reloading of texrures to different formates.
// 1. Reset default format before loading of UI
// 2. Restore default format after loading of UI from stored settings.
Texture::SetDefaultFileFormat(NOT_FILE);
Rect r = Rect(x, y, boxSize, boxSize);
UIControl *sceneFlagBox = new UIControl(r);
sceneFlagBox->SetName("flagBox");
sceneFlagBox->GetBackground()->SetDrawType(UIControlBackground::DRAW_SCALE_TO_RECT);
sceneFlagBox->SetSprite("~res:/Gfx/UI/marker", 1);
sceneFlagBox->SetInputEnabled(false);
c->AddControl(sceneFlagBox);
SafeRelease(sceneFlagBox);
Texture::SetDefaultFileFormat((ImageFileFormat)EditorSettings::Instance()->GetTextureViewFileFormat());
}
Material *mat = GetMaterial(index);
bool found = false;
if(EDM_ALL == displayMode)
{
for (int32 i = 0; i < (int32)workingNodeMaterials.size(); ++i)
{
if(workingNodeMaterials[i] == mat)
{
found = true;
break;
}
}
}
else
{
found = true;
}
ControlsFactory::CustomizeListCell(c, StringToWString(mat->GetName()), false);
UIControl *sceneFlagBox = c->FindByName("flagBox");
sceneFlagBox->SetVisible(found, false);
if (index == selectedMaterial)
{
c->SetSelected(true, false);
lastSelection = c;
}
else
{
c->SetSelected(false, false);
}
return c;
}