mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-10 11:08:10 +00:00
Add RmlUi: SettingsUIMenu. And the other menus that already use RmlUi have been cleaned up.
This commit is contained in:
@@ -251,12 +251,11 @@ void UIScene_LoadCreateJoinMenu::SetListTexture(int itemIndex, const char* listI
|
||||
|
||||
// -- Construction / Destruction --
|
||||
|
||||
UIScene_LoadCreateJoinMenu::UIScene_LoadCreateJoinMenu(int iPad, void* initData, UILayer* parentLayer) : UIScene(iPad, parentLayer)
|
||||
UIScene_LoadCreateJoinMenu::UIScene_LoadCreateJoinMenu(int iPad, void* initData, UILayer* parentLayer) : UIScene_RmlBase(iPad, parentLayer)
|
||||
{
|
||||
constexpr uint64_t MAXIMUM_SAVE_STORAGE = 4LL * 1024LL * 1024LL * 1024LL;
|
||||
|
||||
// Initialize all members before any function calls
|
||||
m_document = nullptr;
|
||||
m_iRequestingThumbnailId = 0;
|
||||
m_iSaveInfoC = 0;
|
||||
m_bIgnoreInput = false;
|
||||
@@ -383,44 +382,6 @@ UIScene_LoadCreateJoinMenu::~UIScene_LoadCreateJoinMenu()
|
||||
}
|
||||
}
|
||||
|
||||
// -- RmlUi lifecycle overrides --
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::gainFocus()
|
||||
{
|
||||
if (!bHasFocus && stealsFocus())
|
||||
{
|
||||
bHasFocus = true;
|
||||
updateTooltips();
|
||||
updateComponents();
|
||||
|
||||
if (!m_bFocussedOnce)
|
||||
{
|
||||
}
|
||||
|
||||
handleGainFocus(m_bFocussedOnce);
|
||||
|
||||
if (bHasFocus)
|
||||
m_bFocussedOnce = true;
|
||||
|
||||
if (m_document)
|
||||
m_document->Show();
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::handleLoseFocus()
|
||||
{
|
||||
if (m_document)
|
||||
m_document->Hide();
|
||||
}
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::reloadMovie(bool force)
|
||||
{
|
||||
}
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::render(S32 width, S32 height, C4JRender::eViewportType viewport)
|
||||
{
|
||||
}
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::ProcessEvent(Rml::Event& event)
|
||||
{
|
||||
if (m_bIgnoreInput)
|
||||
@@ -917,29 +878,7 @@ void UIScene_LoadCreateJoinMenu::UpdateGamesListCallback(LPVOID pParam)
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::tick()
|
||||
{
|
||||
UIScene::tick();
|
||||
|
||||
m_hasTickedOnce = true;
|
||||
|
||||
// Forward mouse/input to RmlUi context
|
||||
Rml::Context* rmlCtx = RmlManager::Get().GetContext();
|
||||
if (rmlCtx && bHasFocus)
|
||||
{
|
||||
rmlCtx->ProcessMouseMove(g_KBMInput.GetMouseX(), g_KBMInput.GetMouseY(), 0);
|
||||
if (g_KBMInput.IsMouseButtonPressed(KeyboardMouseInput::MOUSE_LEFT))
|
||||
rmlCtx->ProcessMouseButtonDown(0, 0);
|
||||
if (g_KBMInput.IsMouseButtonReleased(KeyboardMouseInput::MOUSE_LEFT))
|
||||
rmlCtx->ProcessMouseButtonUp(0, 0);
|
||||
if (g_KBMInput.IsMouseButtonPressed(KeyboardMouseInput::MOUSE_RIGHT))
|
||||
rmlCtx->ProcessMouseButtonDown(1, 0);
|
||||
if (g_KBMInput.IsMouseButtonReleased(KeyboardMouseInput::MOUSE_RIGHT))
|
||||
rmlCtx->ProcessMouseButtonUp(1, 0);
|
||||
int wheelDelta = g_KBMInput.GetMouseWheel();
|
||||
if (wheelDelta != 0)
|
||||
rmlCtx->ProcessMouseWheel(wheelDelta / -120, 0);
|
||||
|
||||
rmlCtx->Update();
|
||||
}
|
||||
UIScene_RmlBase::tick();
|
||||
|
||||
if (m_bExitScene)
|
||||
if (!m_bRetrievingSaveThumbnails)
|
||||
|
||||
Reference in New Issue
Block a user