palladium/source/overlays/settings.cpp

40 lines
1.1 KiB
C++
Raw Normal View History

#include <pd/overlays/settings.hpp>
namespace PD {
int SettingsMenu::too = 0;
void SettingsMenu::Update(float delta, LI::Renderer::Ref ren, Hid::Ref inp) {
if (!ctx) {
ctx = UI7::Context::New(ren, inp);
ctx->RootLayer(70);
}
flymgr.Update(delta);
if (rem && flymgr.IsFinished()) {
this->Kill();
}
ren->OnScreen(ren->GetScreen(false));
if (ctx->BeginMenu("Palladium - Settings", UI7MenuFlags_CenterTitle)) {
auto m = ctx->GetCurrentMenu();
m->PushAlignment(UI7Align_Center);
m->SeparatorText("Library Info");
m->Label(LibInfo::CompiledWith());
m->Join();
m->Label(LibInfo::CxxVersion());
m->Join();
m->Label("Version: " + LibInfo::Version() + "[" + LibInfo::Commit() + "]");
m->Join();
m->Label("Build Time: " + LibInfo::BuildTime());
m->JoinAlign(UI7Align_Mid);
ctx->EndMenu();
}
ren->OnScreen(ren->GetScreen(true));
if (ctx->BeginMenu("pdovlssettings", UI7MenuFlags_NoTitlebar)) {
auto m = ctx->GetCurrentMenu();
m->SeparatorText("Settings");
if (m->Button("Exit")) {
this->Rem();
}
ctx->EndMenu();
}
ctx->Update(delta);
}
} // namespace PD