本文整理汇总了C++中Border::ApplySchemeSettings方法的典型用法代码示例。如果您正苦于以下问题:C++ Border::ApplySchemeSettings方法的具体用法?C++ Border::ApplySchemeSettings怎么用?C++ Border::ApplySchemeSettings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Border
的用法示例。
在下文中一共展示了Border::ApplySchemeSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadBorders
//-----------------------------------------------------------------------------
// Purpose: create the Border objects from the scheme data
//-----------------------------------------------------------------------------
void CScheme::LoadBorders()
{
m_pkvBorders = m_pData->FindKey("Borders", true);
{for ( KeyValues *kv = m_pkvBorders->GetFirstSubKey(); kv != NULL; kv = kv->GetNextKey())
{
if (kv->GetDataType() == KeyValues::TYPE_STRING)
{
// it's referencing another border, ignore for now
}
else
{
int i = m_BorderList.AddToTail();
Border *border = new Border();
border->SetName(kv->GetName());
border->ApplySchemeSettings(this, kv);
m_BorderList[i].border = border;
m_BorderList[i].bSharedBorder = false;
m_BorderList[i].borderSymbol = kv->GetNameSymbol();
}
}}
// iterate again to get the border references
for ( KeyValues *kv = m_pkvBorders->GetFirstSubKey(); kv != NULL; kv = kv->GetNextKey())
{
if (kv->GetDataType() == KeyValues::TYPE_STRING)
{
// it's referencing another border, find it
Border *border = (Border *)GetBorder(kv->GetString());
// const char *str = kv->GetName();
Assert(border);
// add an entry that just references the existing border
int i = m_BorderList.AddToTail();
m_BorderList[i].border = border;
m_BorderList[i].bSharedBorder = true;
m_BorderList[i].borderSymbol = kv->GetNameSymbol();
}
}
m_pBaseBorder = GetBorder("BaseBorder");
}