mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
This commit is contained in:
@@ -72,9 +72,10 @@
|
||||
- Fix: [#18009] Visual glitch with litter at edge of sloped path.
|
||||
- Fix: [#18025] Fix land ownership in Six Holland, Six Flags Magic Mountain, North America - Grand Canyon and Asia - Great Wall of China Tourism Enhancement scenarios.
|
||||
- Fix: [#18026] Park rating drops to 0 with more than 32k guests, total ride excitement or intensity.
|
||||
- Fix: [#18051] Visual glitch with Mine Ride's large unbanked turn.
|
||||
- Fix: [#18032] All non-interactive widgets (labels, groupboxes) produce sound when clicked.
|
||||
- Fix: [#18035] Favourited servers don’t get their online status updated.
|
||||
- Fix: [#18051] Visual glitch with Mine Ride's large unbanked turn.
|
||||
- Fix: [#18059] [Plugin] Width and height of custom window not changeable via script.
|
||||
|
||||
0.4.1 (2022-07-04)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
25
distribution/openrct2.d.ts
vendored
25
distribution/openrct2.d.ts
vendored
@@ -2666,20 +2666,29 @@ declare global {
|
||||
}
|
||||
|
||||
interface Window {
|
||||
classification: number;
|
||||
number: number;
|
||||
readonly classification: number;
|
||||
readonly number: number;
|
||||
x: number;
|
||||
y: number;
|
||||
/**
|
||||
* The window is resizable (by the user) if and only if minWidth !== maxWidth or minHeight !== maxHeight.
|
||||
* In that case, the window displays a small widget in the lower right corner that the user can use to resize the window by clicking and dragging.
|
||||
*
|
||||
* When writing to width (or height), if the window is resizable, the new value will be clamped to fit the corresponding min/max values.
|
||||
* Otherwise, if the window is not resizable, both the width (or height) and the corresponding min/max values are set to the new value.
|
||||
*
|
||||
* For the default min/max values, see {@link WindowDesc}.
|
||||
*/
|
||||
width: number;
|
||||
height: number;
|
||||
minWidth: number;
|
||||
maxWidth: number;
|
||||
minHeight: number;
|
||||
maxHeight: number;
|
||||
isSticky: boolean;
|
||||
readonly isSticky: boolean;
|
||||
colours: number[];
|
||||
title: string;
|
||||
widgets: Widget[];
|
||||
readonly widgets: Widget[];
|
||||
tabIndex: number;
|
||||
|
||||
close(): void;
|
||||
@@ -2695,6 +2704,14 @@ declare global {
|
||||
height: number;
|
||||
title: string;
|
||||
id?: number;
|
||||
/**
|
||||
* See {@link Window} for information about the behaviour of min/max width/height after window creation.
|
||||
*
|
||||
* Behaviour during window creation:
|
||||
* If at least one of the parameters min/max width/height is present, the window is considered to be resizable.
|
||||
* In that case, the min values default to zero (if unspecified) and the max values default to 0xFFFF (if unspecified).
|
||||
* Otherwise, the min/max width values default to width and the min/max height values default to height.
|
||||
*/
|
||||
minWidth?: number;
|
||||
minHeight?: number;
|
||||
maxWidth?: number;
|
||||
|
||||
@@ -98,9 +98,16 @@ namespace OpenRCT2::Scripting
|
||||
{
|
||||
auto w = GetWindow();
|
||||
if (w != nullptr)
|
||||
{
|
||||
if (window_can_resize(*w))
|
||||
{
|
||||
window_resize(*w, value - w->width, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
window_set_resize(*w, value, w->min_height, value, w->max_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
int32_t height_get() const
|
||||
{
|
||||
@@ -115,9 +122,16 @@ namespace OpenRCT2::Scripting
|
||||
{
|
||||
auto w = GetWindow();
|
||||
if (w != nullptr)
|
||||
{
|
||||
if (window_can_resize(*w))
|
||||
{
|
||||
window_resize(*w, 0, value - w->height);
|
||||
}
|
||||
else
|
||||
{
|
||||
window_set_resize(*w, w->min_width, value, w->max_width, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
int32_t minWidth_get() const
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRCT2
|
||||
|
||||
namespace OpenRCT2::Scripting
|
||||
{
|
||||
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 60;
|
||||
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 61;
|
||||
|
||||
// Versions marking breaking changes.
|
||||
static constexpr int32_t API_VERSION_33_PEEP_DEPRECATION = 33;
|
||||
|
||||
Reference in New Issue
Block a user