diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 639194b677..cd3e7a8be2 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Feature: [#8481] Multi-threaded rendering. - Feature: [#8919] Allow setting ride price from console. - Feature: [#8963] Add missing Czech letters to sprite font, use sprite font for Czech. +- Feature: [#9154] Change map toolbar icon with current viewport rotation. - Change: [#7877] Files are now sorted in logical rather than dictionary order. - Change: [#8688] Move common actions from debug menu into cheats menu. - Fix: [#5579] Network desync immediately after connecting. diff --git a/resources/g2/icons/map_east.png b/resources/g2/icons/map_east.png new file mode 100644 index 0000000000..2d078a88e8 Binary files /dev/null and b/resources/g2/icons/map_east.png differ diff --git a/resources/g2/icons/map_east_pressed.png b/resources/g2/icons/map_east_pressed.png new file mode 100644 index 0000000000..8979ef881c Binary files /dev/null and b/resources/g2/icons/map_east_pressed.png differ diff --git a/resources/g2/icons/map_north.png b/resources/g2/icons/map_north.png new file mode 100644 index 0000000000..d50f7dc4df Binary files /dev/null and b/resources/g2/icons/map_north.png differ diff --git a/resources/g2/icons/map_north_pressed.png b/resources/g2/icons/map_north_pressed.png new file mode 100644 index 0000000000..7ad1050742 Binary files /dev/null and b/resources/g2/icons/map_north_pressed.png differ diff --git a/resources/g2/icons/map_south.png b/resources/g2/icons/map_south.png new file mode 100644 index 0000000000..8e66136186 Binary files /dev/null and b/resources/g2/icons/map_south.png differ diff --git a/resources/g2/icons/map_south_pressed.png b/resources/g2/icons/map_south_pressed.png new file mode 100644 index 0000000000..a58d2d3b50 Binary files /dev/null and b/resources/g2/icons/map_south_pressed.png differ diff --git a/resources/g2/icons/map_west.png b/resources/g2/icons/map_west.png new file mode 100644 index 0000000000..0aa74611d7 Binary files /dev/null and b/resources/g2/icons/map_west.png differ diff --git a/resources/g2/icons/map_west_pressed.png b/resources/g2/icons/map_west_pressed.png new file mode 100644 index 0000000000..93bf7d0bf4 Binary files /dev/null and b/resources/g2/icons/map_west_pressed.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index f1b78eacbb..81eabe7675 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -394,6 +394,30 @@ "x_offset": 2, "y_offset": 1 }, + { + "path": "icons/map_north.png" + }, + { + "path": "icons/map_north_pressed.png" + }, + { + "path": "icons/map_west.png" + }, + { + "path": "icons/map_west_pressed.png" + }, + { + "path": "icons/map_south.png" + }, + { + "path": "icons/map_south_pressed.png" + }, + { + "path": "icons/map_east.png" + }, + { + "path": "icons/map_east_pressed.png" + }, { "path": "font/latin/ae-uc-small.png", "y_offset": 0, diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index ec173da5b3..855d53d892 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -849,6 +849,20 @@ static void window_top_toolbar_invalidate(rct_window* w) else window_top_toolbar_widgets[WIDX_MUTE].image = IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_UNMUTE; + // Set map button to the right image. + if (window_top_toolbar_widgets[WIDX_MAP].type != WWT_EMPTY) + { + static constexpr uint32_t imageIdByRotation[] = { + SPR_G2_MAP_NORTH, + SPR_G2_MAP_WEST, + SPR_G2_MAP_SOUTH, + SPR_G2_MAP_EAST, + }; + + uint32_t mapImageId = imageIdByRotation[get_current_rotation()]; + window_top_toolbar_widgets[WIDX_MAP].image = IMAGE_TYPE_REMAP | mapImageId; + } + // Zoomed out/in disable. Not sure where this code is in the original. if (window_get_main()->viewport->zoom == 0) { diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 50b8d1ec3b..8f31e5f2e1 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -829,7 +829,16 @@ enum SPR_G2_EYEDROPPER = SPR_G2_BEGIN + 112, SPR_G2_CHAT = SPR_G2_BEGIN + 113, - SPR_G2_CHAR_BEGIN = SPR_G2_BEGIN + 114, + SPR_G2_MAP_NORTH = SPR_G2_BEGIN + 114, + SPR_G2_MAP_NORTH_PRESSED = SPR_G2_BEGIN + 115, + SPR_G2_MAP_WEST = SPR_G2_BEGIN + 116, + SPR_G2_MAP_WEST_PRESSED = SPR_G2_BEGIN + 117, + SPR_G2_MAP_SOUTH = SPR_G2_BEGIN + 118, + SPR_G2_MAP_SOUTH_PRESSED = SPR_G2_BEGIN + 119, + SPR_G2_MAP_EAST = SPR_G2_BEGIN + 120, + SPR_G2_MAP_EAST_PRESSED = SPR_G2_BEGIN + 121, + + SPR_G2_CHAR_BEGIN = SPR_G2_BEGIN + 122, SPR_G2_AE_UPPER = SPR_G2_CHAR_BEGIN, SPR_G2_AE_LOWER = SPR_G2_CHAR_BEGIN + 1,