# Stage 1.9
- Add AppInit Flags and AppFlags to COntrol some Individual Stuff (Not using default can run into a crash report if things get used that are disabled) - Create a Test Settings Menu - Make Some Menu functions Public - Add ScrollTo Animation - Make ContainerApi fully public - Remove an else statement (now need to find a way to not set the pos twice) -
This commit is contained in:
39
source/overlays/settings.cpp
Normal file
39
source/overlays/settings.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
#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->SeparatorText("Library Info");
|
||||
m->Label(LibInfo::CompiledWith());
|
||||
m->AfterAlignCenter();
|
||||
m->Label(LibInfo::CxxVersion());
|
||||
m->AfterAlignCenter();
|
||||
m->Label("Version: " + LibInfo::Version() + "[" + LibInfo::Commit() + "]");
|
||||
m->AfterAlignCenter();
|
||||
m->Label("Build Time: " + LibInfo::BuildTime());
|
||||
m->AfterAlignCenter();
|
||||
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
|
Reference in New Issue
Block a user