Change map toolbar icon with current rotation (#9154)

This commit is contained in:
Aaron van Geffen 2019-05-02 00:07:20 +02:00 committed by GitHub
parent 181a722c3b
commit df42cfe1e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 1 deletions

View File

@ -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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -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,

View File

@ -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)
{

View File

@ -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,