2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-03-09 19:47:37 -08:00
|
|
|
|
2019-09-22 14:52:05 -07:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/GuiSys/CGuiPane.hpp"
|
|
|
|
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
|
2016-03-09 19:47:37 -08:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-12-07 21:30:43 -08:00
|
|
|
|
|
|
|
class CGuiTextPane : public CGuiPane {
|
2022-02-13 13:32:52 -08:00
|
|
|
static bool sDrawPaneRects;
|
2018-12-07 21:30:43 -08:00
|
|
|
CGuiTextSupport xd4_textSupport;
|
2016-03-09 19:47:37 -08:00
|
|
|
|
2016-03-11 20:58:56 -08:00
|
|
|
public:
|
2018-12-07 21:30:43 -08: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,
|
2022-02-23 00:18:50 -08:00
|
|
|
s32 padX, s32 padY, CAssetId jpFontId, s32 jpExtentX, s32 jpExtentY);
|
2019-08-09 05:45:18 -07:00
|
|
|
FourCC GetWidgetTypeID() const override { return FOURCC('TXPN'); }
|
2016-03-21 19:27:46 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
CGuiTextSupport& TextSupport() { return xd4_textSupport; }
|
|
|
|
const CGuiTextSupport& GetTextSupport() const { return xd4_textSupport; }
|
2019-08-09 05:45:18 -07:00
|
|
|
void Update(float dt) override;
|
2020-03-17 22:14:36 -07:00
|
|
|
bool GetIsFinishedLoadingWidgetSpecific() override;
|
2018-12-07 21:30:43 -08:00
|
|
|
std::vector<CAssetId> GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; }
|
2019-08-09 05:45:18 -07:00
|
|
|
void SetDimensions(const zeus::CVector2f& dim, bool initVBO) override;
|
|
|
|
void ScaleDimensions(const zeus::CVector3f& scale) override;
|
2020-03-17 22:14:36 -07:00
|
|
|
void Draw(const CGuiWidgetDrawParms& parms) override;
|
2019-08-09 05:45:18 -07:00
|
|
|
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
|
2016-03-21 19:27:46 -07:00
|
|
|
|
2022-02-23 00:18:50 -08:00
|
|
|
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp, u32 version);
|
2016-03-11 20:58:56 -08:00
|
|
|
};
|
2016-03-09 19:47:37 -08:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|