diff --git a/resources/g2/icons/colour_invisible.png b/resources/g2/icons/colour_invisible.png new file mode 100644 index 0000000000..af1c4fd57a Binary files /dev/null and b/resources/g2/icons/colour_invisible.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index d47d64bc25..82c4e825c2 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -20588,6 +20588,9 @@ "x_offset": -5, "y_offset": -20, "palette": "keep" + }, + { + "path": "icons/colour_invisible.png" }, { "path": "palette_map/palette_map_dark_olive_dark.png" diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 67aa3832d8..cfa070c6c7 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -467,8 +467,12 @@ void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownCol if (selectedColour == COLOUR_UI_ORDER[i]) defaultIndex = selectedColour; + // Use special graphic for Invisible color + auto imageId = (i == COLOUR_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE, COLOUR_BORDEAUX_RED) + : ImageId(SPR_PALETTE_BTN, COLOUR_UI_ORDER[i]); + gDropdownItems[i].Format = Dropdown::FormatColourPicker; - gDropdownItems[i].Args = (i << 32) | ImageId(SPR_PALETTE_BTN, COLOUR_UI_ORDER[i]).ToUInt32(); + gDropdownItems[i].Args = (i << 32) | imageId.ToUInt32(); } // Show dropdown diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 821b205244..ba66caed90 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -296,7 +296,7 @@ enum // Start of G2 Palettes - SPR_PALETTE_DARK_OLIVE_DARK = 32607, + SPR_PALETTE_DARK_OLIVE_DARK = SPR_G2_PAL_REMAP_DARK_OLIVE_DARK, SPR_PALETTE_DARK_OLIVE_LIGHT, SPR_PALETTE_SATURATED_BROWN_LIGHT, SPR_PALETTE_BORDEAUX_RED_DARK, diff --git a/src/openrct2/interface/Colour.cpp b/src/openrct2/interface/Colour.cpp index 04981f08c9..bf6acc8e77 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -59,7 +59,7 @@ void ColoursInitMaps() // G2 Palette Init for (int32_t i = COLOUR_NUM_ORIGINAL; i < COLOUR_COUNT; i++) { - const G1Element* g1 = GfxGetG1Element(SPR_G2_PALETTE_BEGIN + i - COLOUR_NUM_ORIGINAL); + const G1Element* g1 = GfxGetG1Element(SPR_G2_PALETTE_BEGIN + i - (COLOUR_NUM_ORIGINAL - 1)); if (g1 != nullptr) { ColourMapA[i].colour_0 = g1->offset[INDEX_COLOUR_0]; diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 2da7fba9d5..76eba2ebbd 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1364,7 +1364,8 @@ enum SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL = SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 4, SPR_G2_ALPINE_END = SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 12, - SPR_G2_PALETTE_BEGIN = SPR_G2_ALPINE_END, + SPR_G2_ICON_PALETTE_INVISIBLE, + SPR_G2_PALETTE_BEGIN = SPR_G2_ICON_PALETTE_INVISIBLE, SPR_G2_PAL_REMAP_DARK_OLIVE_DARK, SPR_G2_PAL_REMAP_DARK_OLIVE_LIGHT, SPR_G2_PAL_REMAP_SATURATED_BROWN_LIGHT,