diff --git a/resources/g2/icons/colour_invisible.png b/resources/g2/icons/colour_invisible.png index af1c4fd57a..e93619f0c6 100644 Binary files a/resources/g2/icons/colour_invisible.png and b/resources/g2/icons/colour_invisible.png differ diff --git a/resources/g2/icons/colour_invisible_pressed.png b/resources/g2/icons/colour_invisible_pressed.png new file mode 100644 index 0000000000..b9b5fa9fb5 Binary files /dev/null and b/resources/g2/icons/colour_invisible_pressed.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 82c4e825c2..4beaf254dd 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -20591,6 +20591,9 @@ }, { "path": "icons/colour_invisible.png" + }, + { + "path": "icons/colour_invisible_pressed.png" }, { "path": "palette_map/palette_map_dark_olive_dark.png" diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 328c0343b9..d5e1349183 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -1186,5 +1186,12 @@ static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex wid ImageId GetColourButtonImage(colour_t colour) { - return ImageId(SPR_PALETTE_BTN, colour).WithBlended(true); + if (colour == COLOUR_OFFSET_INVISIBLE) + { + return ImageId(SPR_G2_ICON_PALETTE_INVISIBLE - 1, colour).WithBlended(false); + } + else + { + return ImageId(SPR_PALETTE_BTN, colour).WithBlended(true); + } } diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 716b162051..80b726fe87 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -473,8 +473,7 @@ void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownCol // Get palette offset for G2 colours // Use special graphic for Invisible colour - //auto imageId = (orderedColour == FilterPaletteID::PaletteG2Invisible) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE, COLOUR_BORDEAUX_RED) - auto imageId = ImageId(SPR_PALETTE_BTN, orderedColour); + auto imageId = (orderedColour == COLOUR_OFFSET_INVISIBLE) ? ImageId(SPR_G2_ICON_PALETTE_INVISIBLE - 1, COLOUR_WHITE) : ImageId(SPR_PALETTE_BTN, orderedColour); gDropdownItems[i].Format = Dropdown::FormatColourPicker; gDropdownItems[i].Args = (i << 32) | imageId.ToUInt32(); diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 977f6cd3f9..0c48f88cc4 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -295,8 +295,7 @@ enum SPR_PALETTE_GLASS_LIGHT_PINK = 5047, // Start of G2 Palettes - // For some reason these only load correctly if this is set to the G2 index ONE PRIOR to actual index - SPR_PALETTE_DARK_OLIVE_DARK = SPR_G2_ICON_PALETTE_INVISIBLE, + SPR_PALETTE_DARK_OLIVE_DARK = SPR_G2_PALETTE_BEGIN - 1, 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 fa0e723b24..4a044ff2ca 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -42,6 +42,7 @@ void ColoursInitMaps() // Get palette index in g1 / g2 auto paletteIndex = (i < COLOUR_NUM_ORIGINAL) ? SPR_PALETTE_2_START : SPR_G2_PALETTE_BEGIN - COLOUR_NUM_ORIGINAL; const G1Element* g1 = GfxGetG1Element(paletteIndex + i); + //TODO: Integrate themes with G2 palettes if (g1 != nullptr) { ColourMapA[i].colour_0 = g1->offset[INDEX_COLOUR_0]; diff --git a/src/openrct2/interface/Colour.h b/src/openrct2/interface/Colour.h index 52d1b3b3c8..934cdc8d3a 100644 --- a/src/openrct2/interface/Colour.h +++ b/src/openrct2/interface/Colour.h @@ -206,6 +206,7 @@ constexpr uint8_t PALETTE_LENGTH_ANIMATED = 16; constexpr uint8_t COLOUR_NUM_ORIGINAL = 32; constexpr uint8_t COLOUR_NUM_NORMAL = 54; constexpr uint8_t COLOUR_ID_G2_OFFSET = 112; +constexpr uint8_t COLOUR_OFFSET_INVISIBLE = 166; #define TEXT_COLOUR_254 (254) #define TEXT_COLOUR_255 (255) diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 7e38d5b1c0..083129b374 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1365,6 +1365,7 @@ enum SPR_G2_ALPINE_END = SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 12, SPR_G2_ICON_PALETTE_INVISIBLE, + SPR_G2_ICON_PALETTE_INVISIBLE_PRESSED, SPR_G2_PALETTE_BEGIN, SPR_G2_PAL_REMAP_DARK_OLIVE_DARK = SPR_G2_PALETTE_BEGIN, SPR_G2_PAL_REMAP_DARK_OLIVE_LIGHT,