metaforce/Runtime/GuiSys/CGuiPane.hpp

38 lines
1.1 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
#include <memory>
#include <vector>
#include "Runtime/GuiSys/CGuiWidget.hpp"
#include <zeus/CVector2f.hpp>
#include <zeus/CVector3f.hpp>
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
class CGuiPane : public CGuiWidget {
2022-03-05 21:46:53 +00:00
static constexpr zeus::CVector3f skDefaultNormal{0.f, -1.f, 0.f};
2016-03-17 22:19:25 +00:00
protected:
2018-12-08 05:30:43 +00:00
zeus::CVector2f xb8_dim;
2016-03-17 22:19:25 +00:00
2018-12-08 05:30:43 +00:00
/* Originally a vert-buffer pointer for GX */
std::array<zeus::CVector3f, 4> xc0_verts;
2016-03-17 22:19:25 +00:00
2018-12-08 05:30:43 +00:00
zeus::CVector3f xc8_scaleCenter;
2016-03-17 22:19:25 +00:00
public:
2018-12-08 05:30:43 +00:00
CGuiPane(const CGuiWidgetParms& parms, const zeus::CVector2f& dim, const zeus::CVector3f& scaleCenter);
FourCC GetWidgetTypeID() const override { return FOURCC('PANE'); }
void Draw(const CGuiWidgetDrawParms& parms) override;
2018-12-08 05:30:43 +00:00
virtual void ScaleDimensions(const zeus::CVector3f& scale);
virtual void SetDimensions(const zeus::CVector2f& dim, bool initVBO);
virtual zeus::CVector2f GetDimensions() const;
virtual void InitializeBuffers();
virtual void WriteData(COutputStream& out, bool flag) const;
2016-03-17 22:19:25 +00:00
2018-12-08 05:30:43 +00:00
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce