Implemented window_staff_peep_fire. Added new window class WC_FIRE_PROMPT.

This commit is contained in:
hexdec 2014-08-28 01:48:49 +02:00
parent 60e90063f0
commit 1b077af90e
2 changed files with 23 additions and 1 deletions

View File

@ -340,6 +340,7 @@ enum {
WC_PEEP = 23,
WC_GUEST_LIST = 24,
WC_STAFF_LIST = 25,
WC_FIRE_PROMPT = 26,
WC_PARK_INFORMATION = 27,
WC_FINANCES = 28,
WC_TITLE_MENU = 29,

View File

@ -264,7 +264,28 @@ void window_staff_peep_close()
/** rct2: 0x6C0A77 */
void window_staff_peep_fire(rct_window* w)
{
RCT2_CALLPROC_X(0x6C0A77, 0, 0, 0, 0, (int)w, 0, 0);
// Check if the confirm window already exists.
if (window_bring_to_front_by_id(0x1A, w->number)) {
return;
}
// Find center of the screen.
int screen_height = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16);
int screen_width = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16);
int x = screen_width/2 - 100;
int y = screen_height/2 - 50;
rct_window* window_prompt = window_create(x, y, 200, 100, (uint32*)0x992C3C, 0x1A, 0);
window_prompt->widgets = (rct_widget*)0x9AFB4C;
window_prompt->enabled_widgets |= 0x4;
window_prompt->enabled_widgets |= 0x8;
window_prompt->enabled_widgets |= 0x10;
window_init_scroll_widgets(window_prompt);
window_prompt->flags |= 0x10;
window_prompt->number = w->number;
window_prompt->colours[0] = 0x9A;
}
/**