2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

Bug fixes and CGuiFrame mouse events

This commit is contained in:
Jack Andersen
2019-01-19 20:43:11 -10:00
parent 851e113dc0
commit 47c6b5cba8
21 changed files with 118 additions and 46 deletions

View File

@@ -104,6 +104,12 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const {
CGuiWidget::Draw(parms);
}
bool CGuiModel::TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const {
if (!xb8_model || !xb8_model.IsLoaded())
return false;
return xb8_model->GetAABB().projectedPointTest(vp * x34_worldXF.toMatrix4f(), point);
}
std::shared_ptr<CGuiWidget> CGuiModel::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) {
CGuiWidgetParms parms = ReadWidgetHeader(frame, in);