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:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user