1#ifndef GAME_EDITOR_MAPITEMS_LAYER_GROUP_H
2#define GAME_EDITOR_MAPITEMS_LAYER_GROUP_H
3
4#include "layer.h"
5
6#include <game/editor/map_object.h>
7
8#include <memory>
9#include <vector>
10
11class CLayerGroup : public CMapObject
12{
13public:
14 std::vector<std::shared_ptr<CLayer>> m_vpLayers;
15
16 int m_OffsetX;
17 int m_OffsetY;
18
19 int m_ParallaxX;
20 int m_ParallaxY;
21
22 int m_UseClipping;
23 int m_ClipX;
24 int m_ClipY;
25 int m_ClipW;
26 int m_ClipH;
27
28 char m_aName[12];
29 bool m_GameGroup;
30 bool m_Visible;
31 bool m_Collapse;
32
33 explicit CLayerGroup(CEditorMap *pMap);
34 void OnAttach(CEditorMap *pMap) override;
35
36 void Convert(CUIRect *pRect) const;
37 void Render(const CEditorMap *pRenderMap);
38 void MapScreen();
39 CScreenRect Mapping() const;
40
41 void GetSize(float *pWidth, float *pHeight) const;
42
43 void AddLayer(const std::shared_ptr<CLayer> &pLayer);
44 void DeleteLayer(int Index);
45 void DuplicateLayer(int Index);
46 int MoveLayer(int IndexFrom, int IndexTo);
47
48 bool IsEmpty() const;
49 void Clear();
50
51 void ModifyImageIndex(const FIndexModifyFunction &IndexModifyFunction);
52 void ModifyEnvelopeIndex(const FIndexModifyFunction &IndexModifyFunction);
53 void ModifySoundIndex(const FIndexModifyFunction &IndexModifyFunction);
54};
55
56#endif
57