MyGUI_TileRect.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_TILE_RECT_H_
#define MYGUI_TILE_RECT_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_XmlDocument.h"
#include "MyGUI_Types.h"
#include "MyGUI_ISubWidgetRect.h"
#include "MyGUI_ResourceSkin.h"
#include "MyGUI_RenderFormat.h"
namespace MyGUI
{
class RenderItem;
class MYGUI_EXPORT TileRect : public ISubWidgetRect
{
MYGUI_RTTI_DERIVED(TileRect)
public:
TileRect();
void setAlpha(float _alpha) override;
void setVisible(bool _visible) override;
void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
void destroyDrawItem() override;
// метод для отрисовки себя
void doRender() override;
void setStateData(IStateInfo* _data) override;
/*internal:*/
void _updateView() override;
void _correctView() override;
void _setAlign(const IntSize& _oldsize) override;
void _setUVSet(const FloatRect& _rect) override;
void _setColour(const Colour& _value) override;
protected:
bool mEmptyView{false};
VertexColourType mVertexFormat;
uint32 mCurrentColour{0xFFFFFFFF};
FloatRect mCurrentTexture;
IntCoord mCurrentCoord;
ILayerNode* mNode{nullptr};
RenderItem* mRenderItem{nullptr};
IntSize mTileSize;
size_t mCountVertex;
float mRealTileWidth{0};
float mRealTileHeight{0};
float mTextureHeightOne{0};
float mTextureWidthOne{0};
bool mTileH{true};
bool mTileV{true};
};
} // namespace MyGUI
#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