mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Merge pull request #1515 from MaikelS11/build-ride-improvement
Back button on "Select Design" list #1346
This commit is contained in:
commit
e54e74257d
3 changed files with 12 additions and 3 deletions
|
@ -3786,3 +3786,4 @@ STR_5449 :Reduce game speed
|
||||||
STR_5450 :Increase game speed
|
STR_5450 :Increase game speed
|
||||||
STR_5451 :Open cheats window
|
STR_5451 :Open cheats window
|
||||||
STR_5452 :Toggle visibility of toolbars
|
STR_5452 :Toggle visibility of toolbars
|
||||||
|
STR_5453 :Select another ride
|
||||||
|
|
|
@ -1762,6 +1762,8 @@ enum {
|
||||||
STR_SHORTCUT_OPEN_CHEATS_WINDOW = 5451,
|
STR_SHORTCUT_OPEN_CHEATS_WINDOW = 5451,
|
||||||
STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS = 5452,
|
STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS = 5452,
|
||||||
|
|
||||||
|
STR_SELECT_OTHER_RIDE = 5453,
|
||||||
|
|
||||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||||
STR_COUNT = 32768
|
STR_COUNT = 32768
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,17 +38,19 @@ enum {
|
||||||
WIDX_TRACK_LIST,
|
WIDX_TRACK_LIST,
|
||||||
WIDX_TRACK_PREVIEW,
|
WIDX_TRACK_PREVIEW,
|
||||||
WIDX_ROTATE,
|
WIDX_ROTATE,
|
||||||
WIDX_TOGGLE_SCENERY
|
WIDX_TOGGLE_SCENERY,
|
||||||
|
WIDX_BACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
static rct_widget window_track_list_widgets[] = {
|
static rct_widget window_track_list_widgets[] = {
|
||||||
{ WWT_FRAME, 0, 0, 599, 0, 399, 0xFFFFFFFF, STR_NONE },
|
{ WWT_FRAME, 0, 0, 599, 0, 399, 0xFFFFFFFF, STR_NONE },
|
||||||
{ WWT_CAPTION, 0, 1, 598, 1, 14, STR_SELECT_DESIGN, STR_WINDOW_TITLE_TIP },
|
{ WWT_CAPTION, 0, 1, 598, 1, 14, STR_SELECT_DESIGN, STR_WINDOW_TITLE_TIP },
|
||||||
{ WWT_CLOSEBOX, 0, 587, 597, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP },
|
{ WWT_CLOSEBOX, 0, 587, 597, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP },
|
||||||
{ WWT_SCROLL, 0, 4, 221, 18, 395, 2, STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP },
|
{ WWT_SCROLL, 0, 4, 221, 33, 395, 2, STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP },
|
||||||
{ WWT_FLATBTN, 0, 224, 595, 18, 236, 0xFFFFFFFF, STR_NONE },
|
{ WWT_FLATBTN, 0, 224, 595, 18, 236, 0xFFFFFFFF, STR_NONE },
|
||||||
{ WWT_FLATBTN, 0, 574, 597, 374, 397, 5169, STR_ROTATE_90_TIP },
|
{ WWT_FLATBTN, 0, 574, 597, 374, 397, 5169, STR_ROTATE_90_TIP },
|
||||||
{ WWT_FLATBTN, 0, 574, 597, 350, 373, 5171, STR_TOGGLE_SCENERY_TIP },
|
{ WWT_FLATBTN, 0, 574, 597, 350, 373, 5171, STR_TOGGLE_SCENERY_TIP },
|
||||||
|
{ WWT_13, 0, 4, 221, 18, 29, STR_SELECT_OTHER_RIDE, STR_NONE },
|
||||||
{ WIDGETS_END },
|
{ WIDGETS_END },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +138,7 @@ void window_track_list_open(ride_list_item item)
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
w->widgets = window_track_list_widgets;
|
w->widgets = window_track_list_widgets;
|
||||||
w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY);
|
w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_ROTATE) | (1 << WIDX_TOGGLE_SCENERY) | (1 << WIDX_BACK);
|
||||||
window_init_scroll_widgets(w);
|
window_init_scroll_widgets(w);
|
||||||
w->track_list.var_480 = 0xFFFF;
|
w->track_list.var_480 = 0xFFFF;
|
||||||
w->track_list.var_482 = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 1;
|
w->track_list.var_482 = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 1;
|
||||||
|
@ -266,6 +268,10 @@ static void window_track_list_mouseup()
|
||||||
reset_track_list_cache();
|
reset_track_list_cache();
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
|
case WIDX_BACK:
|
||||||
|
window_close(w);
|
||||||
|
window_new_ride_open();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue