MCPcopy Create free account
hub / github.com/ddnet/ddnet / SelectedLayer

Method SelectedLayer

src/game/editor/mapitems/map.cpp:300–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300std::shared_ptr<CLayer> CEditorMap::SelectedLayer(int Index) const
301{
302 std::shared_ptr<CLayerGroup> pGroup = SelectedGroup();
303 if(!pGroup)
304 return nullptr;
305
306 if(Index < 0 || Index >= (int)m_vSelectedLayers.size())
307 return nullptr;
308
309 int LayerIndex = m_vSelectedLayers[Index];
310
311 if(LayerIndex >= 0 && LayerIndex < (int)m_vpGroups[m_SelectedGroup]->m_vpLayers.size())
312 return pGroup->m_vpLayers[LayerIndex];
313 return nullptr;
314}
315
316std::shared_ptr<CLayer> CEditorMap::SelectedLayerType(int Index, int Type) const
317{

Callers 12

DoToolbarLayersMethod · 0.80
DoMapEditorMethod · 0.80
PopupLayerMethod · 0.80
AddQuadOrSoundMethod · 0.80
LayerSelectImageMethod · 0.80
DeleteSelectedLayerMethod · 0.80
quick_actions.hFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected