2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/GuiSys/CGuiPane.hpp"
|
|
|
|
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
|
|
|
|
class CGuiTextPane : public CGuiPane {
|
|
|
|
CGuiTextSupport xd4_textSupport;
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2016-03-12 04:58:56 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CGuiTextPane(const CGuiWidgetParms& parms, CSimplePool* sp, const zeus::CVector2f& dim, const zeus::CVector3f& vec,
|
|
|
|
CAssetId fontId, const CGuiTextProperties& props, const zeus::CColor& col1, const zeus::CColor& col2,
|
|
|
|
s32 padX, s32 padY);
|
2019-08-09 12:45:18 +00:00
|
|
|
FourCC GetWidgetTypeID() const override { return FOURCC('TXPN'); }
|
2016-03-22 02:27:46 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CGuiTextSupport& TextSupport() { return xd4_textSupport; }
|
|
|
|
const CGuiTextSupport& GetTextSupport() const { return xd4_textSupport; }
|
2019-08-09 12:45:18 +00:00
|
|
|
void Update(float dt) override;
|
|
|
|
bool GetIsFinishedLoadingWidgetSpecific() const override;
|
2018-12-08 05:30:43 +00:00
|
|
|
std::vector<CAssetId> GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; }
|
2019-08-09 12:45:18 +00:00
|
|
|
void SetDimensions(const zeus::CVector2f& dim, bool initVBO) override;
|
|
|
|
void ScaleDimensions(const zeus::CVector3f& scale) override;
|
|
|
|
void Draw(const CGuiWidgetDrawParms& parms) const override;
|
|
|
|
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
|
2016-03-22 02:27:46 +00:00
|
|
|
|
2018-12-08 05:30:43 +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
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|