mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Plugin: allow scripts to specify tab colour maps (#23583)
This commit is contained in:
parent
e7eba6b4c5
commit
805c8e2a11
2 changed files with 18 additions and 0 deletions
3
distribution/openrct2.d.ts
vendored
3
distribution/openrct2.d.ts
vendored
|
@ -4874,6 +4874,9 @@ declare global {
|
||||||
frameBase: number;
|
frameBase: number;
|
||||||
frameCount?: number;
|
frameCount?: number;
|
||||||
frameDuration?: number;
|
frameDuration?: number;
|
||||||
|
primaryColour?: number;
|
||||||
|
secondaryColour?: number;
|
||||||
|
tertiaryColour?: number;
|
||||||
offset?: ScreenCoordsXY;
|
offset?: ScreenCoordsXY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,21 @@ namespace OpenRCT2::Ui::Windows
|
||||||
result.imageFrameCount = AsOrDefault(dukImage["frameCount"], 0);
|
result.imageFrameCount = AsOrDefault(dukImage["frameCount"], 0);
|
||||||
result.imageFrameDuration = AsOrDefault(dukImage["frameDuration"], 0);
|
result.imageFrameDuration = AsOrDefault(dukImage["frameDuration"], 0);
|
||||||
|
|
||||||
|
if (dukImage["primaryColour"].type() == DukValue::Type::NUMBER)
|
||||||
|
{
|
||||||
|
result.imageFrameBase = result.imageFrameBase.WithPrimary(dukImage["primaryColour"].as_uint());
|
||||||
|
|
||||||
|
if (dukImage["secondaryColour"].type() == DukValue::Type::NUMBER)
|
||||||
|
{
|
||||||
|
result.imageFrameBase = result.imageFrameBase.WithSecondary(dukImage["secondaryColour"].as_uint());
|
||||||
|
|
||||||
|
if (dukImage["tertiaryColour"].type() == DukValue::Type::NUMBER)
|
||||||
|
{
|
||||||
|
result.imageFrameBase = result.imageFrameBase.WithTertiary(dukImage["tertiaryColour"].as_uint());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto dukCoord = dukImage["offset"];
|
auto dukCoord = dukImage["offset"];
|
||||||
if (dukCoord.type() == DukValue::Type::OBJECT)
|
if (dukCoord.type() == DukValue::Type::OBJECT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue