From 47f45fac8fdb8b1082372aa9aa8b1491459f81ac Mon Sep 17 00:00:00 2001 From: matheusvb3 <98937378+matheusvb3@users.noreply.github.com> Date: Wed, 29 Oct 2025 09:41:01 -0300 Subject: [PATCH] Add large colour swatches for enlarged UI --- distribution/changelog.txt | 1 + resources/g2/icons/colour_invisible_large.png | Bin 0 -> 128 bytes .../g2/icons/colour_invisible_pressed_large.png | Bin 0 -> 128 bytes resources/g2/icons/colour_large.png | Bin 0 -> 269 bytes resources/g2/icons/colour_pressed_large.png | Bin 0 -> 269 bytes resources/g2/sprites.json | 12 ++++++++++++ src/openrct2-ui/windows/Dropdown.cpp | 16 ++++++++++++---- src/openrct2/SpriteIds.h | 4 ++++ src/openrct2/scripting/IconNames.hpp | 4 ++++ 9 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 resources/g2/icons/colour_invisible_large.png create mode 100644 resources/g2/icons/colour_invisible_pressed_large.png create mode 100644 resources/g2/icons/colour_large.png create mode 100644 resources/g2/icons/colour_pressed_large.png diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 6bc9a3d1d8..19044b75f2 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Improved: [#21375] The `load_object` console command now allows loading JSON objects. - Improved: [#25297] Paths on the ground in SV4/SC4 no longer block supports of the paths above. - Improved: [#25349] ‘Recent Messages’ window can now be fully themed. +- Improved: [#25433] Colour dropdown now uses bigger images in Enlarged UI mode. - Change: [#25089] Peep actions and animations that cause them to stop moving no longer trigger when they are on a level crossing. - Change: [#25337] Placing track designs with scenery that is obstructed no longer disables all of the scenery. - Fix: [#20198] Guest inventory from RCT1 base game saves is not imported. diff --git a/resources/g2/icons/colour_invisible_large.png b/resources/g2/icons/colour_invisible_large.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8b2389f62d79e8f7874b20d3b7cfdc38a2620f GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaP3?%1DUd;wloB=)|u0ZE| zED7=pW^j0RBMrz=^>lFzsbEY_;AL=RTgR$!qJc}ufknNHi}iw={0Y}NJd6qAObmYa WIIl=IKamA$VDNPHb6Mw<&;$Uf3?X#@ literal 0 HcmV?d00001 diff --git a/resources/g2/icons/colour_invisible_pressed_large.png b/resources/g2/icons/colour_invisible_pressed_large.png new file mode 100644 index 0000000000000000000000000000000000000000..9a7cd2b9cc2d15a05d856d6e5deccf66ed983081 GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaP3?%1DUd;wloB=)|u0VSG;lr12-`@1Nl^@7q zED7=pW^j0RBMrz=^>lFzsbEY_;AL=RTgR$!qJc}ufknNHi}iw={0Y}NJd6qAObmYa WIIl=IKamA$VDNPHb6Mw<&;$U46d?Wp literal 0 HcmV?d00001 diff --git a/resources/g2/icons/colour_large.png b/resources/g2/icons/colour_large.png new file mode 100644 index 0000000000000000000000000000000000000000..0941a813aecb493eb8120a6236a5320e3c598bf6 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;6XV0X`wF|Id5>-){eZw(rCJ`UX_9!PCVtq=M1re0w5`B9BYpoyKIw=~_Q7nI0(M%{cyddeTD^ z=?4=f{q>*E{ky-%+{*CxSqXVH=S>go?!D<+S(2NuT0xdqxBSx5;}z3$uG<@A-l^dB z<@lAY(0JmJq2AREOI&-n7tVCA&l8!I^FzX1c#(>^osat3rxN*U3ul|JOIRMAb;eCa zFEd6g#HVQf+cs{s1=Z`r7-fuQdXt;3Uf36txcSul$N#pPC=?VjKH5^ka9hQ#>te@` RXF#_zc)I$ztaD0e0stAWYsvrs literal 0 HcmV?d00001 diff --git a/resources/g2/icons/colour_pressed_large.png b/resources/g2/icons/colour_pressed_large.png new file mode 100644 index 0000000000000000000000000000000000000000..c73c31cb2827e9f358a834a0255e5a22b9036e21 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;6XV0X`wFtDTMad+T5J*M1(Z{6Aj) zf4%zu*~b63+pFiZ&H}30;OXKRQo(4`-=4^#$iq^|F3(-C%AtVQ;1}D4UH^mjSp11= z2n?&X+@Cx5Z`^I(?6Unc-|7{)c}#e#cJ|28En=`UC9QpNkGKGa(i!qa}&rD==Vp5`e=tqY~o z7IiJI<@vz(WZqk0(GrDk%S;=uE|+V&>X>Npt*G^ghPmy&>0(l|*ce|jgvWUry?Sdt QALw=lPgg&ebxsLQ02B>q^#A|> literal 0 HcmV?d00001 diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index f8caa646d0..0bfa446504 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -324,6 +324,18 @@ { "path": "icons/colour_invisible_pressed.png" }, + { + "path": "icons/colour_large.png" + }, + { + "path": "icons/colour_pressed_large.png" + }, + { + "path": "icons/colour_invisible_large.png" + }, + { + "path": "icons/colour_invisible_pressed_large.png" + }, { "path": "icons/folder.png" }, diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 029692d940..0e5f4f8c64 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -468,7 +468,7 @@ namespace OpenRCT2::Ui::Windows return -1; } - // colour_t ordered for use in color dropdown + // colour_t ordered for use in colour dropdown static constexpr colour_t kColoursDropdownOrder[] = { COLOUR_BLACK, COLOUR_SATURATED_RED, @@ -621,9 +621,17 @@ namespace OpenRCT2::Ui::Windows if (selectedColour == orderedColour) defaultIndex = i; - // Use special graphic for Invisible colour - auto imageId = (orderedColour == COLOUR_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE, COLOUR_WHITE) - : ImageId(SPR_PALETTE_BTN, orderedColour); + ImageId imageId; + if (Config::Get().interface.enlargedUi) + { + imageId = (orderedColour == COLOUR_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE_LARGE, COLOUR_WHITE) + : ImageId(SPR_G2_ICON_PALETTE_LARGE, orderedColour); + } + else + { + imageId = (orderedColour == COLOUR_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE, COLOUR_WHITE) + : ImageId(SPR_PALETTE_BTN, orderedColour); + } gDropdown.items[i] = { .type = Dropdown::ItemType::colour, .image = imageId, .tooltip = kColourTooltips[i] }; } diff --git a/src/openrct2/SpriteIds.h b/src/openrct2/SpriteIds.h index e0c463f0e2..02c5c98864 100644 --- a/src/openrct2/SpriteIds.h +++ b/src/openrct2/SpriteIds.h @@ -987,6 +987,10 @@ enum : ImageIndex SPR_G2_PEEP_SPAWN, SPR_G2_ICON_PALETTE_INVISIBLE, SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED, + SPR_G2_ICON_PALETTE_LARGE, + SPR_G2_ICON_PALETTE_PRESSED_LARGE, + SPR_G2_ICON_PALETTE_INVISIBLE_LARGE, + SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED_LARGE, SPR_G2_FOLDER, SPR_G2_FOLDER_NEW, SPR_G2_FOLDER_PARENT, diff --git a/src/openrct2/scripting/IconNames.hpp b/src/openrct2/scripting/IconNames.hpp index ede22c6b15..84bdd33195 100644 --- a/src/openrct2/scripting/IconNames.hpp +++ b/src/openrct2/scripting/IconNames.hpp @@ -169,6 +169,10 @@ namespace OpenRCT2::Scripting { "selection_edge_se", SPR_G2_SELECTION_EDGE_SE }, { "palette_invisible", SPR_G2_ICON_PALETTE_INVISIBLE }, { "palette_invisible_pressed", SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED }, + { "palette_large", SPR_G2_ICON_PALETTE_LARGE }, + { "palette_pressed_large", SPR_G2_ICON_PALETTE_PRESSED_LARGE }, + { "palette_invisible_large", SPR_G2_ICON_PALETTE_INVISIBLE_LARGE }, + { "palette_invisible_pressed_large", SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED_LARGE }, { "monitor_start", SPR_G2_MONITOR_TAB_START }, { "monitor_end", SPR_G2_MONITOR_TAB_END }, };