MyGUI: MyGUI_TileRect.h Source File

MyGUI 3.4.3

MyGUI_TileRect.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_TILE_RECT_H_
8#define MYGUI_TILE_RECT_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_XmlDocument.h"
12#include "MyGUI_Types.h"
13#include "MyGUI_ISubWidgetRect.h"
14#include "MyGUI_ResourceSkin.h"
15#include "MyGUI_RenderFormat.h"
16
17namespace MyGUI
18{
19
20 class RenderItem;
21
22 class MYGUI_EXPORT TileRect : public ISubWidgetRect
23 {
24 MYGUI_RTTI_DERIVED(TileRect)
25
26 public:
27 TileRect();
28
29 void setAlpha(float _alpha) override;
30
31 void setVisible(bool _visible) override;
32
33 void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
34 void destroyDrawItem() override;
35
36 // метод для отрисовки себя
37 void doRender() override;
38
39 void setStateData(IStateInfo* _data) override;
40
41 /*internal:*/
42 void _updateView() override;
43 void _correctView() override;
44
45 void _setAlign(const IntSize& _oldsize) override;
46
47 void _setUVSet(const FloatRect& _rect) override;
48 void _setColour(const Colour& _value) override;
49
50 protected:
51 bool mEmptyView{false};
52
53 VertexColourType mVertexFormat;
54 uint32 mCurrentColour{0xFFFFFFFF};
55
56 FloatRect mCurrentTexture;
57 IntCoord mCurrentCoord;
58
59 ILayerNode* mNode{nullptr};
60 RenderItem* mRenderItem{nullptr};
61
62 IntSize mTileSize;
63 size_t mCountVertex;
64
65 float mRealTileWidth{0};
66 float mRealTileHeight{0};
67
68 float mTextureHeightOne{0};
69 float mTextureWidthOne{0};
70
71 bool mTileH{true};
72 bool mTileV{true};
73 };
74
75} // namespace MyGUI
76
77#endif // MYGUI_TILE_RECT_H_
MyGUI_ISubWidgetRect.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
MyGUI_RenderFormat.h
MyGUI_ResourceSkin.h
MyGUI_Types.h
MyGUI_XmlDocument.h
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:29
MyGUI::IStateInfo
Definition MyGUI_IStateInfo.h:17
MyGUI::ISubWidgetRect
Definition MyGUI_ISubWidgetRect.h:18
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::RenderItem
Definition MyGUI_RenderItem.h:23
MyGUI::TileRect::mTextureWidthOne
float mTextureWidthOne
Definition MyGUI_TileRect.h:69
MyGUI::TileRect::_setAlign
void _setAlign(const IntSize &_oldsize) override
Definition MyGUI_TileRect.cpp:53
MyGUI::TileRect::mRealTileHeight
float mRealTileHeight
Definition MyGUI_TileRect.h:66
MyGUI::TileRect::mRenderItem
RenderItem * mRenderItem
Definition MyGUI_TileRect.h:60
MyGUI::TileRect::mTileH
bool mTileH
Definition MyGUI_TileRect.h:71
MyGUI::TileRect::mCurrentTexture
FloatRect mCurrentTexture
Definition MyGUI_TileRect.h:56
MyGUI::TileRect::mEmptyView
bool mEmptyView
Definition MyGUI_TileRect.h:51
MyGUI::TileRect::_setUVSet
void _setUVSet(const FloatRect &_rect) override
Definition MyGUI_TileRect.cpp:158
MyGUI::TileRect::mCurrentCoord
IntCoord mCurrentCoord
Definition MyGUI_TileRect.h:57
MyGUI::TileRect::mCurrentColour
uint32 mCurrentColour
Definition MyGUI_TileRect.h:54
MyGUI::TileRect::setVisible
void setVisible(bool _visible) override
Definition MyGUI_TileRect.cpp:28
MyGUI::TileRect::createDrawItem
void createDrawItem(ITexture *_texture, ILayerNode *_node) override
Definition MyGUI_TileRect.cpp:322
MyGUI::TileRect::TileRect
TileRect()
Definition MyGUI_TileRect.cpp:22
MyGUI::TileRect::_setColour
void _setColour(const Colour &_value) override
Definition MyGUI_TileRect.cpp:350
MyGUI::TileRect::mTextureHeightOne
float mTextureHeightOne
Definition MyGUI_TileRect.h:68
MyGUI::TileRect::setStateData
void setStateData(IStateInfo *_data) override
Definition MyGUI_TileRect.cpp:340
MyGUI::TileRect::mCountVertex
size_t mCountVertex
Definition MyGUI_TileRect.h:63
MyGUI::TileRect::mTileSize
IntSize mTileSize
Definition MyGUI_TileRect.h:62
MyGUI::TileRect::_correctView
void _correctView() override
Definition MyGUI_TileRect.cpp:47
MyGUI::TileRect::mRealTileWidth
float mRealTileWidth
Definition MyGUI_TileRect.h:65
MyGUI::TileRect::mNode
ILayerNode * mNode
Definition MyGUI_TileRect.h:59
MyGUI::TileRect::setAlpha
void setAlpha(float _alpha) override
Definition MyGUI_TileRect.cpp:38
MyGUI::TileRect::doRender
void doRender() override
Definition MyGUI_TileRect.cpp:165
MyGUI::TileRect::mVertexFormat
VertexColourType mVertexFormat
Definition MyGUI_TileRect.h:53
MyGUI::TileRect::destroyDrawItem
void destroyDrawItem() override
Definition MyGUI_TileRect.cpp:331
MyGUI::TileRect::_updateView
void _updateView() override
Definition MyGUI_TileRect.cpp:98
MyGUI::TileRect::mTileV
bool mTileV
Definition MyGUI_TileRect.h:72
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::uint32
uint32_t uint32
Definition MyGUI_Types.h:48
MyGUI::FloatRect
types::TRect< float > FloatRect
Definition MyGUI_Types.h:34
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Colour
Definition MyGUI_Colour.h:17
MyGUI::VertexColourType
Definition MyGUI_RenderFormat.h:16