mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Fix off-by-one pixel issue in active widget width and height setters
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
- Fix: [#22339] Printing ui.tool.cursor in console crashes the game.
|
||||
- Fix: [#22348] Progress bar screen doesn’t handle window resizing.
|
||||
- Fix: [#22389] Alpine coaster has wrong tunnel entrance type.
|
||||
- Fix: [#22435] [Plugin] Off-by-one pixel issue in active widget width and height setters.
|
||||
|
||||
0.4.12 (2024-07-07)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace OpenRCT2::Scripting
|
||||
auto widget = GetWidget();
|
||||
if (widget != nullptr)
|
||||
{
|
||||
return widget->width();
|
||||
return widget->width() + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ namespace OpenRCT2::Scripting
|
||||
auto widget = GetWidget();
|
||||
if (widget != nullptr)
|
||||
{
|
||||
auto delta = widget->left + value - widget->right;
|
||||
auto delta = widget->left + value - (widget->right + 1);
|
||||
|
||||
Invalidate();
|
||||
widget->right += delta;
|
||||
@@ -246,7 +246,7 @@ namespace OpenRCT2::Scripting
|
||||
auto widget = GetWidget();
|
||||
if (widget != nullptr)
|
||||
{
|
||||
return widget->height();
|
||||
return widget->height() + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -255,7 +255,7 @@ namespace OpenRCT2::Scripting
|
||||
auto widget = GetWidget();
|
||||
if (widget != nullptr)
|
||||
{
|
||||
auto delta = widget->top + value - widget->bottom;
|
||||
auto delta = widget->top + value - (widget->bottom + 1);
|
||||
|
||||
Invalidate();
|
||||
widget->bottom += delta;
|
||||
|
||||
Reference in New Issue
Block a user