1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-21 06:43:04 +01:00

Window: rename WindowResize to WindowResizeByDelta to prevent mistakes (#24145)

This commit is contained in:
Aaron van Geffen
2025-04-04 09:30:09 +02:00
committed by GitHub
parent 2100195467
commit 30cd526325
4 changed files with 5 additions and 5 deletions

View File

@@ -522,7 +522,7 @@ namespace OpenRCT2
int32_t targetWidth = _originalWindowWidth + differentialCoords.x - w.width; int32_t targetWidth = _originalWindowWidth + differentialCoords.x - w.width;
int32_t targetHeight = _originalWindowHeight + differentialCoords.y - w.height; int32_t targetHeight = _originalWindowHeight + differentialCoords.y - w.height;
WindowResize(w, targetWidth, targetHeight); WindowResizeByDelta(w, targetWidth, targetHeight);
} }
} }

View File

@@ -678,7 +678,7 @@ namespace OpenRCT2::Ui::Windows
return _currentTextBox; return _currentTextBox;
} }
void WindowResize(WindowBase& w, int16_t dw, int16_t dh) void WindowResizeByDelta(WindowBase& w, int16_t dw, int16_t dh)
{ {
if (dw == 0 && dh == 0) if (dw == 0 && dh == 0)
return; return;

View File

@@ -71,7 +71,7 @@ namespace OpenRCT2::Ui::Windows
bool TextBoxCaretIsFlashed(); bool TextBoxCaretIsFlashed();
const WidgetIdentifier& GetCurrentTextBox(); const WidgetIdentifier& GetCurrentTextBox();
void WindowResize(WindowBase& w, int16_t dw, int16_t dh); void WindowResizeByDelta(WindowBase& w, int16_t dw, int16_t dh);
void WindowInitScrollWidgets(WindowBase& w); void WindowInitScrollWidgets(WindowBase& w);
void WindowUpdateScrollWidgets(WindowBase& w); void WindowUpdateScrollWidgets(WindowBase& w);

View File

@@ -99,7 +99,7 @@ namespace OpenRCT2::Scripting
{ {
if (WindowCanResize(*w)) if (WindowCanResize(*w))
{ {
WindowResize(*w, value - w->width, 0); WindowResizeByDelta(*w, value - w->width, 0);
} }
else else
{ {
@@ -123,7 +123,7 @@ namespace OpenRCT2::Scripting
{ {
if (WindowCanResize(*w)) if (WindowCanResize(*w))
{ {
WindowResize(*w, 0, value - w->height); WindowResizeByDelta(*w, 0, value - w->height);
} }
else else
{ {