mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 23:11:20 +00:00
Many functions are modifying internals of CBooModel and const-casting is performed in order to work around functions being const when they really shouldn't be. This amends the function signatures in order to allow these functions to exist without const_cast, making code much nicer to read.
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
#include "Runtime/GuiSys/CGuiPane.hpp"
|
|
#include "Runtime/GuiSys/CGuiTextSupport.hpp"
|
|
|
|
namespace urde {
|
|
|
|
class CGuiTextPane : public CGuiPane {
|
|
CGuiTextSupport xd4_textSupport;
|
|
|
|
public:
|
|
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);
|
|
FourCC GetWidgetTypeID() const override { return FOURCC('TXPN'); }
|
|
|
|
CGuiTextSupport& TextSupport() { return xd4_textSupport; }
|
|
const CGuiTextSupport& GetTextSupport() const { return xd4_textSupport; }
|
|
void Update(float dt) override;
|
|
bool GetIsFinishedLoadingWidgetSpecific() override;
|
|
std::vector<CAssetId> GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; }
|
|
void SetDimensions(const zeus::CVector2f& dim, bool initVBO) override;
|
|
void ScaleDimensions(const zeus::CVector3f& scale) override;
|
|
void Draw(const CGuiWidgetDrawParms& parms) override;
|
|
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
|
|
|
|
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
|
|
};
|
|
|
|
} // namespace urde
|