static void window_title_menu_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) { if (widgetIndex == WIDX_SHOW_TUTORIAL) { gDropdownItemsFormat[0] = STR_TUTORIAL_BEGINNERS; gDropdownItemsFormat[1] = STR_TUTORIAL_CUSTOM_RIDES; gDropdownItemsFormat[2] = STR_TUTORIAL_ROLLER_COASTER; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[0] | 0x80, DROPDOWN_FLAG_STAY_OPEN, 3 ); } else if (widgetIndex == WIDX_GAME_TOOLS) { gDropdownItemsFormat[0] = STR_SCENARIO_EDITOR; gDropdownItemsFormat[1] = STR_CONVERT_SAVED_GAME_TO_SCENARIO; gDropdownItemsFormat[2] = STR_ROLLER_COASTER_DESIGNER; gDropdownItemsFormat[3] = STR_TRACK_DESIGNS_MANAGER; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[0] | 0x80, DROPDOWN_FLAG_STAY_OPEN, 4 ); } }
/** * * rct2: 0x0066FA57 */ static void window_editor_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) { if (widgetIndex == WIDX_FILE_MENU) { short dropdownItemCount = 8; gDropdownItemsFormat[0] = STR_LOAD_LANDSCAPE; gDropdownItemsFormat[1] = STR_SAVE_LANDSCAPE; gDropdownItemsFormat[2] = 0; gDropdownItemsFormat[3] = STR_ABOUT; gDropdownItemsFormat[4] = STR_OPTIONS; gDropdownItemsFormat[5] = STR_SCREENSHOT; gDropdownItemsFormat[6] = 0; gDropdownItemsFormat[7] = STR_QUIT_SCENARIO_EDITOR; if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) { dropdownItemCount = 5; gDropdownItemsFormat[0] = STR_ABOUT; gDropdownItemsFormat[1] = STR_OPTIONS; gDropdownItemsFormat[2] = STR_SCREENSHOT; gDropdownItemsFormat[3] = 0; gDropdownItemsFormat[4] = STR_QUIT_TRACK_DESIGNS_MANAGER; if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) { gDropdownItemsFormat[4] = STR_QUIT_ROLLERCOASTER_DESIGNER; } } window_dropdown_show_text(w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[0] | 0x80, 0x80, dropdownItemCount); } else if (widgetIndex == WIDX_VIEW_MENU) { top_toolbar_init_view_menu(w, widget); } }
static void window_player_list_scrollmousedown(rct_window *w, int scrollIndex, int x, int y) { if (network_get_mode() != NETWORK_MODE_SERVER) { return; } int index; index = y / 10; if (index >= w->no_list_items) return; w->selected_list_item = index; window_invalidate(w); rct_widget *listWidget = &w->widgets[WIDX_LIST]; int ddx = w->x + listWidget->left + x; int ddy = w->y + listWidget->top + y; if (index == 0) { return; } _dropdownPlayerId = network_get_player_id(index); if (_dropdownPlayerId == network_get_current_player_id()) { return; } gDropdownItemsFormat[0] = STR_KICK_PLAYER; window_dropdown_show_text(ddx, ddy, 0, 7, 0, 1); }
void window_editor_object_selection_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) { int num_items; //widget = &w->widgets[widgetIndex - 1]; switch (widgetIndex) { case WIDX_FILTER_DROPDOWN: num_items = 4; gDropdownItemsFormat[0] = 1156; gDropdownItemsFormat[1] = 1156; gDropdownItemsFormat[2] = 1156; gDropdownItemsFormat[3] = 1156; gDropdownItemsArgs[0] = 2741; gDropdownItemsArgs[1] = 5262; gDropdownItemsArgs[2] = 5263; gDropdownItemsArgs[3] = 5264; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[widget->colour], DROPDOWN_FLAG_STAY_OPEN, num_items ); gDropdownItemsChecked = _filter_flags & 0xF; break; } }
static void window_title_menu_mousedown(rct_window *w, rct_widgetindex widgetIndex, rct_widget* widget) { if (widgetIndex == WIDX_GAME_TOOLS) { gDropdownItemsFormat[0] = STR_SCENARIO_EDITOR; gDropdownItemsFormat[1] = STR_CONVERT_SAVED_GAME_TO_SCENARIO; gDropdownItemsFormat[2] = STR_ROLLER_COASTER_DESIGNER; gDropdownItemsFormat[3] = STR_TRACK_DESIGNS_MANAGER; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, TRANSLUCENT(w->colours[0]), DROPDOWN_FLAG_STAY_OPEN, 4 ); } }
/** * * rct2: 0x0066CA3B */ static void window_game_top_toolbar_mousedown() { short widgetIndex; rct_window *w; rct_widget *widget; rct_viewport *mainViewport; __asm mov widgetIndex, dx __asm mov w, esi __asm mov widget, edi if (widgetIndex == WIDX_FILE_MENU) { gDropdownItemsFormat[0] = 882; gDropdownItemsFormat[1] = 883; gDropdownItemsFormat[2] = 0; gDropdownItemsFormat[3] = 847; gDropdownItemsFormat[4] = 2327; gDropdownItemsFormat[5] = 891; gDropdownItemsFormat[6] = 0; gDropdownItemsFormat[7] = 886; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[0] | 0x80, 0x80, 8 ); } else if (widgetIndex == WIDX_VIEW_MENU) { gDropdownItemsFormat[0] = 1156; gDropdownItemsFormat[1] = 1156; gDropdownItemsFormat[2] = 1156; gDropdownItemsFormat[3] = 0; gDropdownItemsFormat[4] = 1156; gDropdownItemsFormat[5] = 1156; gDropdownItemsFormat[6] = 1156; gDropdownItemsFormat[7] = 1156; gDropdownItemsFormat[8] = 0; gDropdownItemsFormat[9] = 1156; gDropdownItemsFormat[10] = 1156; gDropdownItemsFormat[11] = 1156; gDropdownItemsArgs[0] = 939; gDropdownItemsArgs[1] = 940; gDropdownItemsArgs[2] = 941; gDropdownItemsArgs[4] = 942; gDropdownItemsArgs[5] = 943; gDropdownItemsArgs[6] = 1051; gDropdownItemsArgs[7] = 1052; gDropdownItemsArgs[9] = 1154; gDropdownItemsArgs[10] = 1153; gDropdownItemsArgs[11] = 1155; window_dropdown_show_text( w->x + widget->left, w->y + widget->top, widget->bottom - widget->top + 1, w->colours[1] | 0x80, 0, 12 ); // Set checkmarks mainViewport = window_get_main()->viewport; if (mainViewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) gDropdownItemsChecked |= (1 << 0); if (mainViewport->flags & VIEWPORT_FLAG_HIDE_BASE) gDropdownItemsChecked |= (1 << 1); if (mainViewport->flags & VIEWPORT_FLAG_HIDE_VERTICAL) gDropdownItemsChecked |= (1 << 2); if (mainViewport->flags & VIEWPORT_FLAG_SEETHROUGH_RIDES) gDropdownItemsChecked |= (1 << 4); if (mainViewport->flags & VIEWPORT_FLAG_SEETHROUGH_SCENERY) gDropdownItemsChecked |= (1 << 5); if (mainViewport->flags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS) gDropdownItemsChecked |= (1 << 6); if (mainViewport->flags & VIEWPORT_FLAG_INVISIBLE_PEEPS) gDropdownItemsChecked |= (1 << 7); if (mainViewport->flags & VIEWPORT_FLAG_LAND_HEIGHTS) gDropdownItemsChecked |= (1 << 9); if (mainViewport->flags & VIEWPORT_FLAG_TRACK_HEIGHTS) gDropdownItemsChecked |= (1 << 10); if (mainViewport->flags & VIEWPORT_FLAG_PATH_HEIGHTS) gDropdownItemsChecked |= (1 << 11); } }