DDraceNetwork Docs
layer_group.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_MAPITEMS_LAYER_GROUP_H
2#define GAME_EDITOR_MAPITEMS_LAYER_GROUP_H
3
4#include "layer.h"
5
6#include <memory>
7#include <vector>
8
10{
11public:
13
14 std::vector<std::shared_ptr<CLayer>> m_vpLayers;
15
18
21
27
28 char m_aName[12];
32
35
36 void Convert(CUIRect *pRect) const;
37 void Render();
38 void MapScreen() const;
39 void Mapping(float *pPoints) const;
40
41 void GetSize(float *pWidth, float *pHeight) const;
42
43 void DeleteLayer(int Index);
44 void DuplicateLayer(int Index);
45 int SwapLayers(int Index0, int Index1);
46
47 bool IsEmpty() const
48 {
49 return m_vpLayers.empty();
50 }
51
52 void Clear()
53 {
54 m_vpLayers.clear();
55 }
56
57 void AddLayer(const std::shared_ptr<CLayer> &pLayer);
58
60 {
61 for(auto &pLayer : m_vpLayers)
62 pLayer->ModifyImageIndex(Func);
63 }
64
66 {
67 for(auto &pLayer : m_vpLayers)
68 pLayer->ModifyEnvelopeIndex(Func);
69 }
70
72 {
73 for(auto &pLayer : m_vpLayers)
74 pLayer->ModifySoundIndex(Func);
75 }
76};
77
78#endif
Definition: editor.h:74
Definition: layer_group.h:10
CLayerGroup()
Definition: layer_group.cpp:6
void AddLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: layer_group.cpp:108
void DuplicateLayer(int Index)
Definition: layer_group.cpp:122
char m_aName[12]
Definition: layer_group.h:28
void Clear()
Definition: layer_group.h:52
void Convert(CUIRect *pRect) const
Definition: layer_group.cpp:30
int SwapLayers(int Index0, int Index1)
Definition: layer_group.cpp:146
void GetSize(float *pWidth, float *pHeight) const
Definition: layer_group.cpp:133
bool m_GameGroup
Definition: layer_group.h:29
class CEditorMap * m_pMap
Definition: layer_group.h:12
int m_OffsetY
Definition: layer_group.h:17
void ModifyEnvelopeIndex(FIndexModifyFunction Func)
Definition: layer_group.h:65
int m_ClipX
Definition: layer_group.h:23
~CLayerGroup()
Definition: layer_group.cpp:25
void ModifyImageIndex(FIndexModifyFunction Func)
Definition: layer_group.h:59
bool m_Visible
Definition: layer_group.h:30
bool m_Collapse
Definition: layer_group.h:31
void MapScreen() const
Definition: layer_group.cpp:52
int m_OffsetX
Definition: layer_group.h:16
void Render()
Definition: layer_group.cpp:59
int m_UseClipping
Definition: layer_group.h:22
std::vector< std::shared_ptr< CLayer > > m_vpLayers
Definition: layer_group.h:14
void ModifySoundIndex(FIndexModifyFunction Func)
Definition: layer_group.h:71
int m_ClipH
Definition: layer_group.h:26
void DeleteLayer(int Index)
Definition: layer_group.cpp:114
bool IsEmpty() const
Definition: layer_group.h:47
int m_ParallaxX
Definition: layer_group.h:19
int m_ClipY
Definition: layer_group.h:24
int m_ParallaxY
Definition: layer_group.h:20
void Mapping(float *pPoints) const
Definition: layer_group.cpp:36
int m_ClipW
Definition: layer_group.h:25
Definition: ui_rect.h:11
std::function< void(int *pIndex)> FIndexModifyFunction
Definition: editor.h:52