1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Change window functions to use lowerCamelCase

This commit is contained in:
Gymnasiast
2025-09-17 20:10:06 +02:00
parent d4a0bca091
commit 3a803e13e2
96 changed files with 4166 additions and 4239 deletions

View File

@@ -111,7 +111,7 @@ static constexpr float kWindowScrollLocations[][2] = {
void WindowDispatchUpdateAll()
{
// gTooltipNotShownTicks++;
WindowVisitEach([&](WindowBase* w) { w->OnUpdate(); });
WindowVisitEach([&](WindowBase* w) { w->onUpdate(); });
}
void WindowUpdateAllViewports()
@@ -177,7 +177,7 @@ static constexpr float kWindowScrollLocations[][2] = {
{
gWindowUpdateTicks = gCurrentRealTimeTicks + kGameUpdateFPS;
WindowVisitEach([](WindowBase* w) { w->OnPeriodicUpdate(); });
WindowVisitEach([](WindowBase* w) { w->onPeriodicUpdate(); });
}
// Border flash invalidation
@@ -187,7 +187,7 @@ static constexpr float kWindowScrollLocations[][2] = {
w->flags -= WF_WHITE_BORDER_ONE;
if (!(w->flags & WF_WHITE_BORDER_MASK))
{
w->Invalidate();
w->invalidate();
}
}
});
@@ -200,7 +200,7 @@ static constexpr float kWindowScrollLocations[][2] = {
void WindowNotifyLanguageChange()
{
WindowVisitEach([&](WindowBase* w) { w->OnLanguageChange(); });
WindowVisitEach([&](WindowBase* w) { w->onLanguageChange(); });
}
/*
@@ -255,12 +255,12 @@ static constexpr float kWindowScrollLocations[][2] = {
if (w->windowPos.y + w->height <= window.windowPos.y)
return;
w->Invalidate();
w->invalidate();
if (window.windowPos.x + window.width + 13 >= ContextGetWidth())
return;
auto push_amount = window.windowPos.x + window.width - w->windowPos.x + 3;
w->windowPos.x += push_amount;
w->Invalidate();
w->invalidate();
if (w->viewport != nullptr)
w->viewport->pos.x += push_amount;
});
@@ -290,13 +290,13 @@ static constexpr float kWindowScrollLocations[][2] = {
return;
// Invalidate the window's current area
w2->Invalidate();
w2->invalidate();
int32_t push_amount = w1.windowPos.y + w1.height - w2->windowPos.y + 3;
w2->windowPos.y += push_amount;
// Invalidate the window's new area
w2->Invalidate();
w2->invalidate();
// Update viewport position if necessary
if (w2->viewport != nullptr)
@@ -345,7 +345,7 @@ static constexpr float kWindowScrollLocations[][2] = {
if (!(w.viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE))
{
w.viewport->flags |= VIEWPORT_FLAG_UNDERGROUND_INSIDE;
w.Invalidate();
w.invalidate();
}
}
else
@@ -353,7 +353,7 @@ static constexpr float kWindowScrollLocations[][2] = {
if (w.viewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
{
w.viewport->flags &= ~VIEWPORT_FLAG_UNDERGROUND_INSIDE;
w.Invalidate();
w.invalidate();
}
}
@@ -478,7 +478,7 @@ static constexpr float kWindowScrollLocations[][2] = {
// a window on top of the viewport.
auto* windowMgr = Ui::GetWindowManager();
windowMgr->BringToFront(w);
w.Invalidate();
w.invalidate();
}
/**
@@ -617,14 +617,14 @@ static constexpr float kWindowScrollLocations[][2] = {
// Invalidate modifies the window colours so first get the correct
// colour before setting the global variables for the string painting
w.OnPrepareDraw();
w.onPrepareDraw();
// Text colouring
gCurrentWindowColours[0] = w.colours[0].colour;
gCurrentWindowColours[1] = w.colours[1].colour;
gCurrentWindowColours[2] = w.colours[2].colour;
w.OnDraw(copy);
w.onDraw(copy);
}
bool isToolActive(WindowClass cls)
@@ -712,7 +712,7 @@ static constexpr float kWindowScrollLocations[][2] = {
WindowBase* w = windowMgr->FindByNumber(
gCurrentToolWidget.windowClassification, gCurrentToolWidget.windowNumber);
if (w != nullptr)
w->OnToolAbort(gCurrentToolWidget.widgetIndex);
w->onToolAbort(gCurrentToolWidget.widgetIndex);
}
}
}