metaforce/Runtime/GuiSys/CGuiFrame.cpp

43 lines
1.1 KiB
C++
Raw Normal View History

2016-03-11 05:32:18 +00:00
#include "CGuiFrame.hpp"
2016-03-11 22:50:15 +00:00
#include "CGuiWidget.hpp"
#include "CGuiSys.hpp"
#include "zeus/CColor.hpp"
2016-03-11 05:32:18 +00:00
namespace urde
{
2016-03-11 22:50:15 +00:00
CGuiFrame::CGuiFrame(u32 id, const std::string& name, CGuiSys& sys, int a, int b, int c)
: x4_name(name), x14_id(id), x1c_transitionOpts(EFrameTransitionOptions::Zero),
x3c_guiSys(sys), xb0_a(a), xb4_b(b), xb8_c(c), xbc_24_flag1(false)
2016-03-11 05:32:18 +00:00
{
xa0_lights.resize(8);
2016-03-11 22:50:15 +00:00
x48_rootWidget.reset(new CGuiWidget(
CGuiWidget::CGuiWidgetParms(this, false, 0, 0, false, false, false, zeus::CColor::skWhite,
CGuiWidget::EGuiModelDrawFlags::Two, false,
x3c_guiSys.x2c_mode != CGuiSys::EUsageMode::Zero)));
2016-03-11 05:32:18 +00:00
}
CGuiWidget* CGuiFrame::FindWidget(const std::string& name) const
{
s16 id = x64_idDB.FindWidgetID(name);
if (id == -1)
return nullptr;
return FindWidget(id);
}
CGuiWidget* CGuiFrame::FindWidget(s16 id) const
{
return x48_rootWidget->FindWidget(id);
}
void CGuiFrame::ResetControllerStatus()
{
x0_controllerStatus[0] = false;
x0_controllerStatus[1] = false;
x0_controllerStatus[2] = false;
x0_controllerStatus[3] = false;
}
2016-03-11 05:32:18 +00:00
}