mirror of https://github.com/OpenRCT2/OpenRCT2.git
Move a number of ui only updates into UiContext tick
This commit is contained in:
parent
5470a49382
commit
4810a72232
|
@ -140,6 +140,28 @@ public:
|
|||
void Tick() override
|
||||
{
|
||||
_inGameConsole.Update();
|
||||
|
||||
// the flickering frequency is reduced by 4, compared to the original
|
||||
// it was done due to inability to reproduce original frequency
|
||||
// and decision that the original one looks too fast
|
||||
if (gCurrentRealTimeTicks % 4 == 0)
|
||||
gWindowMapFlashingFlags ^= MapFlashingFlags::SwitchColour;
|
||||
|
||||
// Handle guest map flashing
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::FlashGuests;
|
||||
if (gWindowMapFlashingFlags & MapFlashingFlags::GuestListOpen)
|
||||
gWindowMapFlashingFlags |= MapFlashingFlags::FlashGuests;
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::GuestListOpen;
|
||||
|
||||
// Handle staff map flashing
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::FlashStaff;
|
||||
if (gWindowMapFlashingFlags & MapFlashingFlags::StaffListOpen)
|
||||
gWindowMapFlashingFlags |= MapFlashingFlags::FlashStaff;
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::StaffListOpen;
|
||||
|
||||
_windowManager->UpdateMapTooltip();
|
||||
|
||||
WindowDispatchUpdateAll();
|
||||
}
|
||||
|
||||
void Draw(DrawPixelInfo& dpi) override
|
||||
|
|
|
@ -1561,12 +1561,6 @@ WindowBase* ContextShowError(StringId title, StringId message, const Formatter&
|
|||
return windowManager->ShowError(title, message, args);
|
||||
}
|
||||
|
||||
void ContextUpdateMapTooltip()
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
windowManager->UpdateMapTooltip();
|
||||
}
|
||||
|
||||
void ContextHandleInput()
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
|
|
|
@ -225,7 +225,6 @@ WindowBase* ContextShowError(StringId title, StringId message, const class Forma
|
|||
WindowBase* ContextOpenIntent(Intent* intent);
|
||||
void ContextBroadcastIntent(Intent* intent);
|
||||
void ContextForceCloseWindowByClass(WindowClass wc);
|
||||
void ContextUpdateMapTooltip();
|
||||
void ContextHandleInput();
|
||||
void ContextInputHandleKeyboard(bool isTitle);
|
||||
void ContextQuit();
|
||||
|
|
|
@ -222,26 +222,6 @@ namespace OpenRCT2
|
|||
if (!gOpenRCT2Headless)
|
||||
{
|
||||
InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false);
|
||||
|
||||
// the flickering frequency is reduced by 4, compared to the original
|
||||
// it was done due to inability to reproduce original frequency
|
||||
// and decision that the original one looks too fast
|
||||
if (gCurrentRealTimeTicks % 4 == 0)
|
||||
gWindowMapFlashingFlags ^= MapFlashingFlags::SwitchColour;
|
||||
|
||||
// Handle guest map flashing
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::FlashGuests;
|
||||
if (gWindowMapFlashingFlags & MapFlashingFlags::GuestListOpen)
|
||||
gWindowMapFlashingFlags |= MapFlashingFlags::FlashGuests;
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::GuestListOpen;
|
||||
|
||||
// Handle staff map flashing
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::FlashStaff;
|
||||
if (gWindowMapFlashingFlags & MapFlashingFlags::StaffListOpen)
|
||||
gWindowMapFlashingFlags |= MapFlashingFlags::FlashStaff;
|
||||
gWindowMapFlashingFlags &= ~MapFlashingFlags::StaffListOpen;
|
||||
|
||||
ContextUpdateMapTooltip();
|
||||
}
|
||||
|
||||
// Always perform autosave check, even when paused
|
||||
|
@ -251,8 +231,6 @@ namespace OpenRCT2
|
|||
ScenarioAutosaveCheck();
|
||||
}
|
||||
|
||||
WindowDispatchUpdateAll();
|
||||
|
||||
if (didRunSingleFrame && GameIsNotPaused() && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO))
|
||||
{
|
||||
PauseToggle();
|
||||
|
|
|
@ -168,9 +168,6 @@ void TitleScene::Tick()
|
|||
|
||||
InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false);
|
||||
|
||||
ContextUpdateMapTooltip();
|
||||
WindowDispatchUpdateAll();
|
||||
|
||||
ContextHandleInput();
|
||||
|
||||
gInUpdateCode = false;
|
||||
|
|
Loading…
Reference in New Issue