| 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 | |
| 11 | class CLayerGroup : public CMapObject |
| 12 | { |
| 13 | public: |
| 14 | class CEditorMap *m_pMap; |
| 15 | |
| 16 | std::vector<std::shared_ptr<CLayer>> m_vpLayers; |
| 17 | |
| 18 | int m_OffsetX; |
| 19 | int m_OffsetY; |
| 20 | |
| 21 | int m_ParallaxX; |
| 22 | int m_ParallaxY; |
| 23 | |
| 24 | int m_UseClipping; |
| 25 | int m_ClipX; |
| 26 | int m_ClipY; |
| 27 | int m_ClipW; |
| 28 | int m_ClipH; |
| 29 | |
| 30 | char m_aName[12]; |
| 31 | bool m_GameGroup; |
| 32 | bool m_Visible; |
| 33 | bool m_Collapse; |
| 34 | |
| 35 | explicit CLayerGroup(CEditorMap *pMap); |
| 36 | void OnAttach(CEditorMap *pMap) override; |
| 37 | |
| 38 | void Convert(CUIRect *pRect) const; |
| 39 | void Render(); |
| 40 | void MapScreen(); |
| 41 | void Mapping(float *pPoints) const; |
| 42 | |
| 43 | void GetSize(float *pWidth, float *pHeight) const; |
| 44 | |
| 45 | void AddLayer(const std::shared_ptr<CLayer> &pLayer); |
| 46 | void DeleteLayer(int Index); |
| 47 | void DuplicateLayer(int Index); |
| 48 | int MoveLayer(int IndexFrom, int IndexTo); |
| 49 | |
| 50 | bool IsEmpty() const; |
| 51 | void Clear(); |
| 52 | |
| 53 | void ModifyImageIndex(const FIndexModifyFunction &IndexModifyFunction); |
| 54 | void ModifyEnvelopeIndex(const FIndexModifyFunction &IndexModifyFunction); |
| 55 | void ModifySoundIndex(const FIndexModifyFunction &IndexModifyFunction); |
| 56 | }; |
| 57 | |
| 58 | #endif |
| 59 | |