metaforce/Runtime/GuiSys/CGuiModel.hpp

32 lines
985 B
C++
Raw Permalink Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-03-09 19:47:37 -08:00
#include <memory>
#include "Runtime/CToken.hpp"
#include "Runtime/Graphics/CModel.hpp"
#include "Runtime/GuiSys/CGuiWidget.hpp"
2016-03-09 19:47:37 -08:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
class CSimplePool;
2016-03-09 19:47:37 -08:00
2018-12-07 21:30:43 -08:00
class CGuiModel : public CGuiWidget {
TLockedToken<CModel> xb8_model;
CAssetId xc8_modelId;
u32 xcc_lightMask;
public:
2018-12-07 21:30:43 -08:00
CGuiModel(const CGuiWidgetParms& parms, CSimplePool* sp, CAssetId modelId, u32 lightMask, bool flag);
FourCC GetWidgetTypeID() const override { return FOURCC('MODL'); }
2016-03-16 19:18:01 -07:00
2019-01-21 20:23:51 -08:00
std::vector<CAssetId> GetModelAssets() const { return {xc8_modelId}; }
const TLockedToken<CModel>& GetModel() const { return xb8_model; }
bool GetIsFinishedLoadingWidgetSpecific() override;
void Touch() override;
void Draw(const CGuiWidgetDrawParms& parms) override;
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
2016-03-16 19:18:01 -07:00
2018-12-07 21:30:43 -08:00
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
};
2016-03-09 19:47:37 -08:00
2021-04-10 01:42:06 -07:00
} // namespace metaforce