mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-10 19:28:39 +00:00
Implement UnhandledExceptionFilter and revert "set intro scene background to white"
Also use g_iScreenWidth and g_iScreenHeight in RMLManager
This commit is contained in:
@@ -112,6 +112,10 @@ void UIScene_PauseMenu::reloadMovie(bool force)
|
||||
{
|
||||
}
|
||||
|
||||
//GabsPuN: When Iggy is completely replaced, some functions should be moved to UIScene.cpp.
|
||||
//This way, the tick() function won't be repeated in every UIScene_ cpp file.
|
||||
//Also, since iggy no longer exists, we can take liberties with optimization or code
|
||||
//that is easier to work with.
|
||||
void UIScene_PauseMenu::tick()
|
||||
{
|
||||
// Signal the base class that we've ticked once, so it sets m_bCanHandleInput
|
||||
@@ -124,6 +128,19 @@ void UIScene_PauseMenu::tick()
|
||||
if (!ctx || !bHasFocus)
|
||||
return;
|
||||
|
||||
//GabsPuN: Once the above comment is made, we can do something like this to increase performance.
|
||||
/*
|
||||
int currentX = g_KBMInput.GetMouseX();
|
||||
int currentY = g_KBMInput.GetMouseY();
|
||||
|
||||
if (currentX != m_lastMouseX || currentY != m_lastMouseY)
|
||||
{
|
||||
ctx->ProcessMouseMove(currentX, currentY, 0);
|
||||
m_lastMouseX = currentX;
|
||||
m_lastMouseY = currentY;
|
||||
}
|
||||
*/
|
||||
|
||||
// Forward mouse position (for hover effects and correct click targeting)
|
||||
ctx->ProcessMouseMove(g_KBMInput.GetMouseX(), g_KBMInput.GetMouseY(), 0);
|
||||
|
||||
@@ -174,25 +191,29 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
|
||||
{
|
||||
case ACTION_MENU_UP:
|
||||
ctx->ProcessKeyDown(Rml::Input::KI_UP, 0);
|
||||
handled = true;
|
||||
break;
|
||||
case ACTION_MENU_DOWN:
|
||||
ctx->ProcessKeyDown(Rml::Input::KI_DOWN, 0);
|
||||
handled = true;
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
// Only forward as keyboard Enter if actually coming from keyboard,
|
||||
// not from mouse click (mouse is handled in tick()).
|
||||
if (g_KBMInput.IsKeyPressed(VK_RETURN))
|
||||
{
|
||||
ctx->ProcessKeyDown(Rml::Input::KI_RETURN, 0);
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_CANCEL:
|
||||
case ACTION_MENU_PAUSEMENU:
|
||||
navigateBack();
|
||||
handled = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
handled = true;
|
||||
}
|
||||
|
||||
void UIScene_PauseMenu::ProcessEvent(Rml::Event& event)
|
||||
|
||||
Reference in New Issue
Block a user