1#ifndef GAME_EDITOR_MAPITEMS_LAYER_QUADS_H
2#define GAME_EDITOR_MAPITEMS_LAYER_QUADS_H
3
4#include "layer.h"
5
6class CLayerQuads : public CLayer
7{
8public:
9 explicit CLayerQuads(CEditor *pEditor);
10 CLayerQuads(const CLayerQuads &Other);
11 ~CLayerQuads();
12
13 void Render(bool QuadPicker = false) override;
14 CQuad *NewQuad(int x, int y, int Width, int Height);
15 int SwapQuads(int Index0, int Index1);
16
17 void BrushSelecting(CUIRect Rect) override;
18 int BrushGrab(std::shared_ptr<CLayerGroup> pBrush, CUIRect Rect) override;
19 void BrushPlace(std::shared_ptr<CLayer> pBrush, float wx, float wy) override;
20 void BrushFlipX() override;
21 void BrushFlipY() override;
22 void BrushRotate(float Amount) override;
23
24 CUi::EPopupMenuFunctionResult RenderProperties(CUIRect *pToolbox) override;
25
26 void ModifyImageIndex(FIndexModifyFunction pfnFunc) override;
27 void ModifyEnvelopeIndex(FIndexModifyFunction pfnFunc) override;
28
29 void GetSize(float *pWidth, float *pHeight) override;
30 std::shared_ptr<CLayer> Duplicate() const override;
31 const char *TypeName() const override;
32
33 int m_Image;
34 std::vector<CQuad> m_vQuads;
35};
36
37#endif
38