本文整理汇总了C++中CGroupMap::removeDeco方法的典型用法代码示例。如果您正苦于以下问题:C++ CGroupMap::removeDeco方法的具体用法?C++ CGroupMap::removeDeco怎么用?C++ CGroupMap::removeDeco使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroupMap
的用法示例。
在下文中一共展示了CGroupMap::removeDeco方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setActive
// *********************************************************************************************************
void CDisplayerVisualEntity::setActive(bool active)
{
//H_AUTO(R2_CDisplayerVisualEntity_setActive)
if (active && !getActive())
{
if (getEditor().getEntitySorter())
{
_CreationTimeSwpBufCount = Driver->getSwapBufferCounter();
_ClipBlend = -1.f;
getEditor().getEntitySorter()->registerEntityDisplayer(this);
}
_RegisteredInEditor = true;
updateWorldMapPresence();
}
if (!active && getActive())
{
if (getEditor().getEntitySorter())
{
getEditor().getEntitySorter()->unregisterEntityDisplayer(this);
}
eraseEntity();
// in map
if (_MapDeco.isAddedToMap())
{
CGroupMap *gm = CTool::getWorldMap();
if (gm) gm->removeDeco(&_MapDeco);
}
deletePlaceHolder();
_RegisteredInEditor = false;
}
}
示例2: removeFromWorldMap
//*********************************************************************************************************
void CDisplayerVisualActivitySequence::removeFromWorldMap()
{
//H_AUTO(R2_CDisplayerVisualActivitySequence_removeFromWorldMap)
if (_AddedToWorldMap)
{
CGroupMap *gm = CTool::getWorldMap();
nlassert(gm);
gm->removeDeco(this);
_AddedToWorldMap = false;
}
}
示例3: clear
//***************************************************************
void CAutoGroup::clear()
{
//H_AUTO(R2_CAutoGroup__clear)
if (_AutoGroup.isAddedToWorldMap())
{
CGroupMap *gm = CTool::getWorldMap();
if (gm)
{
gm->removeDeco(&_AutoGroup);
}
}
_AutoGroup.clear();
}
示例4: updateWorldMapPresence
// *********************************************************************************************************
void CDisplayerVisualEntity::updateWorldMapPresence()
{
//H_AUTO(R2_CDisplayerVisualEntity_updateWorldMapPresence)
if (!getActive()) return;
// if not in current map then remove
// if entity not in that map then ignore
bool inIsland = false;
CIslandCollision &col = getEditor().getIslandCollision();
R2::CScenarioEntryPoints::CCompleteIsland *currIsland = col.getCurrIslandDesc();
if (currIsland)
{
inIsland = currIsland->isIn(getWorldPos2f());
}
// in map (displayed only if selectable for now)
if (getDisplayedInstance()->getSelectable() && inIsland)
{
if (!_MapDeco.isAddedToMap())
{
CGroupMap *gm = CTool::getWorldMap();
if (gm)
{
_MapDeco.setDisplayedInstance(getDisplayedInstance(), true);
// retrieve icon from the displayed object (lua code)
CLuaState &ls = getEditor().getLua();
std::string texName = "";
{
CLuaStackChecker lsc(&ls);
if (getDisplayedInstance()->getLuaProjection().callMethodByNameNoThrow("getSelectBarIcon", 0, 1))
{
texName = ls.toString(-1);
ls.pop();
}
}
gm->addDeco(&_MapDeco);
_MapDeco.setCloseTexture(texName);
_MapDeco.invalidateCoords();
}
}
}
else
{
if (_MapDeco.isAddedToMap())
{
CGroupMap *gm = CTool::getWorldMap();
if (gm)
{
gm->removeDeco(&_MapDeco);
}
}
}
}
示例5: deleteShape
// *********************************************************************************************************
void CDisplayerVisualShape::deleteShape()
{
//H_AUTO(R2_CDisplayerVisualShape_deleteShape)
if (!_Instance.empty())
{
Scene->deleteInstance(_Instance);
}
if (_MapDeco.isAddedToMap())
{
CGroupMap *gm = CTool::getWorldMap();
if (gm)
{
gm->removeDeco(&_MapDeco);
}
}
}