MyGUI 3.4.1
MyGUI_RotatingSkin.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_ROTATING_SKIN_H_
8#define MYGUI_ROTATING_SKIN_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
13#include "MyGUI_RenderFormat.h"
14
15namespace MyGUI
16{
17
19 public ISubWidgetRect
20 {
22
23 public:
25
27 void setAngle(float _angle);
29 float getAngle() const;
30
34 void setCenter(const IntPoint& _center);
36 IntPoint getCenter(bool _local = true) const;
37
38 void setAlpha(float _alpha) override;
39
40 void setVisible(bool _visible) override;
41
42 void setStateData(IStateInfo* _data) override;
43
44 void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
45 void destroyDrawItem() override;
46
47 // метод для отрисовки себя
48 void doRender() override;
49
50 /*internal:*/
51 void _updateView() override;
52 void _correctView() override;
53
54 void _setAlign(const IntSize& _oldsize) override;
55
56 void _setUVSet(const FloatRect& _rect) override;
57 void _setColour(const Colour& _value) override;
58
59 protected:
60 void _rebuildGeometry();
61
62 private:
63 bool mGeometryOutdated;
64
65 float mAngle;
66 IntPoint mCenterPos;
67
68 enum {RECT_VERTICIES_COUNT = 4, GEOMETRY_VERTICIES_TOTAL_COUNT = 8};
69 FloatPoint mResultVerticiesPos[GEOMETRY_VERTICIES_TOTAL_COUNT];
70 FloatPoint mResultVerticiesUV[GEOMETRY_VERTICIES_TOTAL_COUNT];
71
72 bool mEmptyView;
73
74 VertexColourType mVertexFormat;
75 uint32 mCurrentColour;
76
77 FloatRect mCurrentTexture;
78 IntCoord mCurrentCoord;
79
80 ILayerNode* mNode;
81 RenderItem* mRenderItem;
82 };
83
84} // namespace MyGUI
85
86#endif // MYGUI_ROTATING_SKIN_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
uint32_t uint32
Definition: MyGUI_Types.h:47