1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 22:13:07 +01:00

Added window_peep_close

Not tested. Cancels any tool that was in use by the window.
This commit is contained in:
Duncan
2014-08-20 12:36:29 +01:00
committed by Duncan Frost
parent a5fcb473ab
commit 581114b1e5

View File

@@ -77,8 +77,10 @@ rct_widget *window_peep_page_widgets[] = {
window_peep_overview_widgets
};
void window_peep_close();
static void* window_peep_overview_events[] = {
(void*)0x696A75,
window_peep_close,
(void*)0x696A06,
(void*)0x696FBE,
window_peep_emptysub,
@@ -174,3 +176,16 @@ void window_peep_open(rct_peep* peep){
window_init_scroll_widgets(window);
RCT2_CALLPROC_X(0x0069883C, 0, 0, 0, 0, (int)window, 0, 0);
}
/* rct2: 0x00696A75 */
void window_peep_close(){
rct_window* w;
window_get_register(w);
if (RCT2_GLOBAL(0x9DE518,uint32) & (1<<3)){
if (w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS,rct_windowclass) &&
w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER,rct_windownumber))
tool_cancel();
}
}