2016-03-10 03:47:37 +00:00
|
|
|
#ifndef __URDE_CGUITEXTPANE_HPP__
|
|
|
|
#define __URDE_CGUITEXTPANE_HPP__
|
|
|
|
|
2016-03-12 04:58:56 +00:00
|
|
|
#include "CGuiPane.hpp"
|
2016-03-18 03:35:16 +00:00
|
|
|
#include "CGuiTextSupport.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2016-03-12 04:58:56 +00:00
|
|
|
class CGuiTextPane : public CGuiPane
|
|
|
|
{
|
2016-09-16 23:43:33 +00:00
|
|
|
CGuiTextSupport xd4_textSupport;
|
2016-03-12 04:58:56 +00:00
|
|
|
public:
|
2017-01-22 01:40:12 +00:00
|
|
|
CGuiTextPane(const CGuiWidgetParms& parms, CSimplePool* sp, const zeus::CVector2f& dim,
|
|
|
|
const zeus::CVector3f& vec, ResId fontId, const CGuiTextProperties& props,
|
|
|
|
const zeus::CColor& col1, const zeus::CColor& col2, s32 padX, s32 padY);
|
2017-01-29 03:58:16 +00:00
|
|
|
FourCC GetWidgetTypeID() const { return FOURCC('TXPN'); }
|
2016-03-22 02:27:46 +00:00
|
|
|
|
2017-01-29 03:58:16 +00:00
|
|
|
CGuiTextSupport* TextSupport() { return &xd4_textSupport; }
|
|
|
|
const CGuiTextSupport* GetTextSupport() const { return &xd4_textSupport; }
|
2016-03-22 02:27:46 +00:00
|
|
|
void Update(float dt);
|
|
|
|
bool GetIsFinishedLoadingWidgetSpecific() const;
|
2017-01-29 03:58:16 +00:00
|
|
|
std::vector<ResId> GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; }
|
2016-03-22 02:27:46 +00:00
|
|
|
void SetDimensions(const zeus::CVector2f& dim, bool initVBO);
|
|
|
|
void ScaleDimensions(const zeus::CVector3f& scale);
|
|
|
|
void Draw(const CGuiWidgetDrawParms& parms) const;
|
|
|
|
|
2017-01-22 01:40:12 +00:00
|
|
|
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
|
2016-03-12 04:58:56 +00:00
|
|
|
};
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUITEXTPANE_HPP__
|