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 "Runtime/CToken.hpp"
|
|
|
|
#include "Runtime/Graphics/CModel.hpp"
|
|
|
|
#include "Runtime/GuiSys/CGuiWidget.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2017-01-22 01:40:12 +00:00
|
|
|
class CSimplePool;
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CGuiModel : public CGuiWidget {
|
|
|
|
TLockedToken<CModel> xb8_model;
|
|
|
|
CAssetId xc8_modelId;
|
|
|
|
u32 xcc_lightMask;
|
|
|
|
|
2016-03-12 04:58:56 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CGuiModel(const CGuiWidgetParms& parms, CSimplePool* sp, CAssetId modelId, u32 lightMask, bool flag);
|
2019-08-09 12:45:18 +00:00
|
|
|
FourCC GetWidgetTypeID() const override { return FOURCC('MODL'); }
|
2016-03-17 02:18:01 +00:00
|
|
|
|
2019-01-22 04:23:51 +00:00
|
|
|
std::vector<CAssetId> GetModelAssets() const { return {xc8_modelId}; }
|
|
|
|
const TLockedToken<CModel>& GetModel() const { return xb8_model; }
|
2020-03-18 05:14:36 +00:00
|
|
|
bool GetIsFinishedLoadingWidgetSpecific() override;
|
|
|
|
void Touch() override;
|
|
|
|
void Draw(const CGuiWidgetDrawParms& parms) override;
|
2019-08-09 12:45:18 +00:00
|
|
|
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
|
2016-03-17 02:18:01 +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
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|