1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

These function names have not reflected their use for a while (#20656)

This commit is contained in:
Duncan
2023-08-01 20:19:33 +01:00
committed by GitHub
parent 19118de773
commit 4349688de4
14 changed files with 26 additions and 26 deletions

View File

@@ -985,7 +985,7 @@ static void InputWidgetOverFlatbuttonInvalidate()
WindowBase* w = WindowFindByNumber(gHoverWidget.window_classification, gHoverWidget.window_number);
if (w != nullptr)
{
WindowEventInvalidateCall(w);
WindowEventOnPrepareDrawCall(w);
if (w->widgets[gHoverWidget.widget_index].type == WindowWidgetType::FlatBtn)
{
WidgetInvalidateByNumber(gHoverWidget.window_classification, gHoverWidget.window_number, gHoverWidget.widget_index);

View File

@@ -726,7 +726,7 @@ static void WidgetScrollDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widg
// Draw the scroll contents
if (scroll_dpi.width > 0 && scroll_dpi.height > 0)
WindowEventScrollPaintCall(&w, scroll_dpi, scrollIndex);
WindowEventScrollDrawCall(&w, scroll_dpi, scrollIndex);
}
static void WidgetHScrollbarDraw(

View File

@@ -742,7 +742,7 @@ namespace OpenRCT2::Ui::Windows
Invalidate();
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
WindowInitScrollWidgets(*this);
Invalidate();

View File

@@ -467,7 +467,7 @@ public:
height = WH_OTHER_TABS;
}
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
WindowInitScrollWidgets(*this);

View File

@@ -213,7 +213,7 @@ void MultiplayerWindow::SetPage(int32_t page_number)
widgets[WIDX_TITLE].text = WindowMultiplayerPageTitles[page];
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
InitScrollWidgets();
Invalidate();
}

View File

@@ -2052,7 +2052,7 @@ private:
Invalidate();
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
InitScrollWidgets();
Invalidate();
}

View File

@@ -632,7 +632,7 @@ private:
}
// Call invalidate event
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
focus = newFocus;
@@ -1193,7 +1193,7 @@ private:
Invalidate();
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
WindowEventUpdateCall(this);
if (listen && viewport != nullptr)
viewport->flags |= VIEWPORT_FLAG_SOUND_ON;

View File

@@ -304,7 +304,7 @@ public:
height = min_height;
Invalidate();
// HACK: For some reason invalidate has not been called
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
ContentUpdateScroll();
}
@@ -314,7 +314,7 @@ public:
height = max_height;
Invalidate();
// HACK: For some reason invalidate has not been called
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
ContentUpdateScroll();
}

View File

@@ -1093,7 +1093,7 @@ private:
Invalidate();
WindowEventResizeCall(this);
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
InitScrollWidgets();
ViewportInit();
Invalidate();
@@ -1156,7 +1156,7 @@ private:
viewport_flags |= VIEWPORT_FLAG_GRIDLINES;
}
WindowEventInvalidateCall(this);
WindowEventOnPrepareDrawCall(this);
focus = tempFocus;

View File

@@ -152,7 +152,7 @@ void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const
return;
auto widget = &widgetWindow->widgets[widgetIndex];
WindowEventInvalidateCall(widgetWindow);
WindowEventOnPrepareDrawCall(widgetWindow);
OpenRCT2String result;
if (widget->flags & WIDGET_FLAGS::TOOLTIP_IS_STRING)

View File

@@ -1429,7 +1429,7 @@ void Guest::CheckCantFindRide()
if (w != nullptr)
{
WindowEventInvalidateCall(w);
WindowEventOnPrepareDrawCall(w);
}
WindowInvalidateByNumber(WindowClass::Peep, Id);
@@ -3112,7 +3112,7 @@ static void PeepLeavePark(Guest* peep)
WindowBase* w = WindowFindByNumber(WindowClass::Peep, peep->Id);
if (w != nullptr)
WindowEventInvalidateCall(w);
WindowEventOnPrepareDrawCall(w);
WindowInvalidateByNumber(WindowClass::Peep, peep->Id);
}

View File

@@ -564,7 +564,7 @@ void PeepWindowStateUpdate(Peep* peep)
{
WindowBase* w = WindowFindByNumber(WindowClass::Peep, peep->Id.ToUnderlying());
if (w != nullptr)
WindowEventInvalidateCall(w);
WindowEventOnPrepareDrawCall(w);
if (peep->Is<Guest>())
{

View File

@@ -419,7 +419,7 @@ WindowBase* WindowFindFromPoint(const ScreenCoordsXY& screenCoords)
WidgetIndex WindowFindWidgetFromPoint(WindowBase& w, const ScreenCoordsXY& screenCoords)
{
// Invalidate the window
WindowEventInvalidateCall(&w);
WindowEventOnPrepareDrawCall(&w);
// Find the widget at point x, y
WidgetIndex widget_index = -1;
@@ -1233,7 +1233,7 @@ static void WindowDrawSingle(DrawPixelInfo& dpi, WindowBase& w, int32_t left, in
// Invalidate modifies the window colours so first get the correct
// colour before setting the global variables for the string painting
WindowEventInvalidateCall(&w);
WindowEventOnPrepareDrawCall(&w);
// Text colouring
gCurrentWindowColours[0] = NOT_TRANSLUCENT(w.colours[0]);
@@ -1241,7 +1241,7 @@ static void WindowDrawSingle(DrawPixelInfo& dpi, WindowBase& w, int32_t left, in
gCurrentWindowColours[2] = NOT_TRANSLUCENT(w.colours[2]);
gCurrentWindowColours[3] = NOT_TRANSLUCENT(w.colours[3]);
WindowEventPaintCall(&w, copy);
WindowEventOnDrawCall(&w, copy);
}
/**
@@ -1293,7 +1293,7 @@ void WindowResize(WindowBase& w, int32_t dw, int32_t dh)
w.height = std::clamp<int32_t>(w.height + dh, w.min_height, w.max_height);
WindowEventResizeCall(&w);
WindowEventInvalidateCall(&w);
WindowEventOnPrepareDrawCall(&w);
// Update scroll widgets
for (auto& scroll : w.scrolls)
@@ -1507,17 +1507,17 @@ void WindowEventMovedCall(WindowBase* w, const ScreenCoordsXY& screenCoords)
w->OnMoved(screenCoords);
}
void WindowEventInvalidateCall(WindowBase* w)
void WindowEventOnPrepareDrawCall(WindowBase* w)
{
w->OnPrepareDraw();
}
void WindowEventPaintCall(WindowBase* w, DrawPixelInfo& dpi)
void WindowEventOnDrawCall(WindowBase* w, DrawPixelInfo& dpi)
{
w->OnDraw(dpi);
}
void WindowEventScrollPaintCall(WindowBase* w, DrawPixelInfo& dpi, int32_t scrollIndex)
void WindowEventScrollDrawCall(WindowBase* w, DrawPixelInfo& dpi, int32_t scrollIndex)
{
w->OnScrollDraw(scrollIndex, dpi);
}

View File

@@ -634,9 +634,9 @@ void WindowEventScrollSelectCall(WindowBase* w, int32_t scrollIndex, int32_t scr
OpenRCT2String WindowEventTooltipCall(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback);
CursorID WindowEventCursorCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
void WindowEventMovedCall(WindowBase* w, const ScreenCoordsXY& screenCoords);
void WindowEventInvalidateCall(WindowBase* w);
void WindowEventPaintCall(WindowBase* w, DrawPixelInfo& dpi);
void WindowEventScrollPaintCall(WindowBase* w, DrawPixelInfo& dpi, int32_t scrollIndex);
void WindowEventOnPrepareDrawCall(WindowBase* w);
void WindowEventOnDrawCall(WindowBase* w, DrawPixelInfo& dpi);
void WindowEventScrollDrawCall(WindowBase* w, DrawPixelInfo& dpi, int32_t scrollIndex);
void InvalidateAllWindowsAfterInput();
void TextinputCancel();