Named 2 input flags, and dropdown fix

Named INPUT_FLAG_1 to INPUT_FLAG_DROPDOWN_STAY_OPEN
Named INPUT_FLAG_2 to INPUT_FLAG_DROPDOWN_MOUSE_UP

placed RCT2_ADDRESS_INPUT_FLAGS where valid and replaced all bitwise
references to it with appropriate input flags.

Changed ride view dropdown to hold only as it should be.
This commit is contained in:
Robert Jordan 2015-05-07 14:31:11 -04:00
parent 1b269675d8
commit c25ef45827
21 changed files with 80 additions and 64 deletions

View File

@ -655,11 +655,11 @@ int game_load_save(const char *path)
if (!load_success){
set_load_objects_fail_reason();
if (RCT2_GLOBAL(0x9DE518,uint32) & (1<<5)){
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_5){
RCT2_GLOBAL(0x14241BC, uint32) = 2;
//call 0x0040705E Sets cursor position and something else. Calls maybe wind func 8 probably pointless
RCT2_GLOBAL(0x14241BC, uint32) = 0;
RCT2_GLOBAL(0x9DE518, uint32) &= ~(1<<5);
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= ~INPUT_FLAG_5;
}
title_load();
rct2_endupdate();

View File

@ -283,7 +283,7 @@ static void game_handle_input_mouse(int x, int y, int state)
if (w->classification != RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_WINDOWCLASS, rct_windowclass) ||
w->number != RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_WINDOWNUMBER, rct_windownumber) ||
!(RCT2_GLOBAL(0x9DE518, uint32)&(1 << 3)))break;
!(RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE)) break;
w = window_find_by_number(
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass),
@ -298,7 +298,7 @@ static void game_handle_input_mouse(int x, int y, int state)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_STATE, uint8) = 0;
if (RCT2_GLOBAL(0x9DE52E, rct_windownumber) != w->number)break;
if ((RCT2_GLOBAL(0x9DE518, uint32)&(1 << 3))){
if ((RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE)){
w = window_find_by_number(
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass),
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber)
@ -308,7 +308,7 @@ static void game_handle_input_mouse(int x, int y, int state)
RCT2_CALLPROC_X(w->event_handlers[WE_TOOL_UP], x, y, 0, (int)RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16), (int)w, 0, 0);
}
else{
if ((RCT2_GLOBAL(0x9DE518, uint32) & (1 << 4)))
if ((RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_4))
break;
viewport_interaction_left_click(x, y);
@ -811,7 +811,7 @@ void process_mouse_over(int x, int y)
switch (window->widgets[widgetId].type){
case WWT_VIEWPORT:
if ((RCT2_GLOBAL(0x9DE518, int) & 0x8) == 0) {
if ((RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, int) & INPUT_FLAG_TOOL_ACTIVE) == 0) {
if (viewport_interaction_left_over(x, y)) {
sub_6ED990(CURSOR_HAND_POINT);
return;
@ -897,7 +897,7 @@ void process_mouse_over(int x, int y)
*/
void process_mouse_tool(int x, int y)
{
if (RCT2_GLOBAL(0x9DE518, uint32) & (1 << 3))
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE)
{
rct_window* w = window_find_by_number(
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, uint8),
@ -951,9 +951,9 @@ void input_state_widget_pressed(int x, int y, int state, int widgetIndex, rct_wi
window_event_mouse_down_call(w, widgetIndex);
}
if (RCT2_GLOBAL(0x009DE518, uint32) & 1) return;
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_WIDGET_PRESSED) return;
RCT2_GLOBAL(0x009DE518, uint32) |= 1;
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_WIDGET_PRESSED;
widget_invalidate_by_number(cursor_w_class, cursor_w_number, widgetIndex);
return;
case 3:
@ -976,9 +976,9 @@ void input_state_widget_pressed(int x, int y, int state, int widgetIndex, rct_wi
if (cursor_w_class != w->classification || cursor_w_number != w->number || widgetIndex != cursor_widgetIndex)
goto dropdown_cleanup;
dropdown_index = -1;
if (RCT2_GLOBAL(0x9DE518, uint32) & 2){
if (!(RCT2_GLOBAL(0x9DE518, uint32) & 4)){
RCT2_GLOBAL(0x9DE518, uint32) |= (1 << 2);
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_DROPDOWN_STAY_OPEN){
if (!(RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_DROPDOWN_MOUSE_UP)){
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_DROPDOWN_MOUSE_UP;
return;
}
}
@ -986,8 +986,8 @@ void input_state_widget_pressed(int x, int y, int state, int widgetIndex, rct_wi
window_close_by_class(WC_DROPDOWN);
cursor_w = window_find_by_number(cursor_w_class, cursor_w_number);
if (RCT2_GLOBAL(0x9DE518, uint32) & 1) {
RCT2_GLOBAL(0x9DE518, uint32) &= 0xFFFE;
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_WIDGET_PRESSED) {
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= 0xFFFE;
widget_invalidate_by_number(cursor_w_class, cursor_w_number, cursor_widgetIndex);
}
@ -1030,8 +1030,8 @@ void input_state_widget_pressed(int x, int y, int state, int widgetIndex, rct_wi
RCT2_GLOBAL(0x9DE528, uint16) = 0;
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_STATE, uint8) != 5){
// Hold down widget and drag outside of area??
if (RCT2_GLOBAL(0x9DE518, uint32) & 1){
RCT2_GLOBAL(0x9DE518, uint32) &= 0xFFFE;
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_WIDGET_PRESSED){
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= 0xFFFE;
widget_invalidate_by_number(cursor_w_class, cursor_w_number, cursor_widgetIndex);
}
return;

View File

@ -26,11 +26,12 @@
enum {
INPUT_FLAG_WIDGET_PRESSED = (1 << 0),
// Related to dropdowns, set on flag 0x80
INPUT_FLAG_1 = (1 << 1),
// The dropdown can stay open if the mouse is released, set on flag DROPDOWN_FLAG_STAY_OPEN
INPUT_FLAG_DROPDOWN_STAY_OPEN = (1 << 1),
// Related to dropdowns
INPUT_FLAG_2 = (1 << 2),
// The mouse has been released and the dropdown is still open
// INPUT_FLAG_DROPDOWN_STAY_OPEN is already set if this happens
INPUT_FLAG_DROPDOWN_MOUSE_UP = (1 << 2),
INPUT_FLAG_TOOL_ACTIVE = (1 << 3),

View File

@ -29,6 +29,7 @@
#include "../world/map.h"
#include "../world/scenery.h"
#include "../world/sprite.h"
#include "../input.h"
#include "viewport.h"
static void viewport_interaction_remove_scenery(rct_map_element *mapElement, int x, int y);
@ -264,7 +265,6 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info
return info->type;
}
if ((RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & 0x48) != 0x48)
if (window_find_by_class(WC_RIDE_CONSTRUCTION) == NULL && window_find_by_class(WC_FOOTPATH) == NULL)
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;

View File

@ -244,7 +244,7 @@ static void window_banner_mousedown(int widgetIndex, rct_window*w, rct_widget* w
widget->top + w->y,
widget->bottom - widget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
13,
widget->right - widget->left - 3);

View File

@ -136,9 +136,9 @@ void window_dropdown_show_text_custom_width(int x, int y, int extray, uint8 colo
memcpy((void*)0x009DEBA4, gDropdownItemsFormat, 40 * 2);
memcpy((void*)0x009DEBF4, gDropdownItemsArgs, 40 * 8);
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= ~(INPUT_FLAG_1 | INPUT_FLAG_2);
if (flags & 0x80)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_1;
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= ~(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP);
if (flags & DROPDOWN_FLAG_STAY_OPEN)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_DROPDOWN_STAY_OPEN;
window_dropdown_close();
_dropdown_num_columns = 1;
@ -213,9 +213,9 @@ void window_dropdown_show_image(int x, int y, int extray, uint8 colour, uint8 fl
memcpy((void*)0x009DEBA4, gDropdownItemsFormat, 40 * 2);
memcpy((void*)0x009DEBF4, gDropdownItemsArgs, 40 * 8);
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= ~(INPUT_FLAG_1 | INPUT_FLAG_2);
if (flags & 0x80)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_1;
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) &= ~(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP);
if (flags & DROPDOWN_FLAG_STAY_OPEN)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= INPUT_FLAG_DROPDOWN_STAY_OPEN;
// Close existing dropdown
window_dropdown_close();
@ -428,7 +428,7 @@ void window_dropdown_show_colour_available(rct_window *w, rct_widget *widget, ui
w->y + widget->top,
widget->bottom - widget->top + 1,
dropdownColour,
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
12,
12,

View File

@ -25,6 +25,11 @@
#define DROPDOWN_SEPARATOR 0
enum
{
DROPDOWN_FLAG_STAY_OPEN = (1 << 7)
};
extern int gAppropriateImageDropdownItemsPerRow[];
extern int gDropdownNumItems;

View File

@ -507,7 +507,7 @@ static void window_editor_objective_options_show_objective_dropdown(rct_window *
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
dropdownWidget->right - dropdownWidget->left - 3
);
@ -537,7 +537,7 @@ static void window_editor_objective_options_show_climate_dropdown(rct_window *w)
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4,
dropdownWidget->right - dropdownWidget->left - 3
);
@ -561,7 +561,7 @@ static void window_editor_objective_options_show_category_dropdown(rct_window *w
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
5,
dropdownWidget->right - dropdownWidget->left - 3
);

View File

@ -1049,7 +1049,7 @@ static void window_editor_scenario_options_park_mousedown(int widgetIndex, rct_w
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top - 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
2,
dropdownWidget->right - dropdownWidget->left - 3
);

View File

@ -1375,7 +1375,7 @@ static void window_finances_research_mousedown(int widgetIndex, rct_window *w, r
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4,
dropdownWidget->right - dropdownWidget->left - 3
);

View File

@ -33,6 +33,7 @@
#include "../interface/widget.h"
#include "../interface/window.h"
#include "../world/footpath.h"
#include "../input.h"
#include "dropdown.h"
#include "error.h"
@ -555,7 +556,7 @@ void window_guest_overview_close(){
window_get_register(w);
if (RCT2_GLOBAL(0x9DE518,uint32) & (1<<3)){
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE){
if (w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS,rct_windowclass) &&
w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER,rct_windownumber))
tool_cancel();
@ -645,7 +646,7 @@ void window_guest_overview_mouse_up(){
/* rct2: 0x696AA0 */
void window_guest_set_page(rct_window* w, int page){
if (RCT2_GLOBAL(0x9DE518,uint32) & (1 << 3))
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE)
{
if(w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber) &&
w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass))

View File

@ -339,7 +339,7 @@ static void window_guest_list_mousedown(int widgetIndex, rct_window*w, rct_widge
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
_window_guest_list_num_pages,
widget->right - widget->left - 3
);
@ -363,7 +363,7 @@ static void window_guest_list_mousedown(int widgetIndex, rct_window*w, rct_widge
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
2,
widget->right - widget->left - 3
);

View File

@ -319,8 +319,8 @@ static void window_map_mouseup()
RCT2_GLOBAL(0x9E32D2, sint8) = 0;
if (!(RCT2_GLOBAL(0x9DE518, sint32) & (1 << 6))) // Remove?
RCT2_GLOBAL(0x9DE518, sint32) |= (1 << 6);
if (!(RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, sint32) & INPUT_FLAG_6)) // Remove?
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, sint32) |= INPUT_FLAG_6;
show_gridlines();
show_land_rights();

View File

@ -273,7 +273,7 @@ static void window_new_campaign_mousedown(int widgetIndex, rct_window *w, rct_wi
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
dropdownWidget->right - dropdownWidget->left - 3
);
@ -295,7 +295,7 @@ static void window_new_campaign_mousedown(int widgetIndex, rct_window *w, rct_wi
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
dropdownWidget->right - dropdownWidget->left - 3
);

View File

@ -866,7 +866,7 @@ static void window_options_show_dropdown(rct_window *w, rct_widget *widget, int
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
num_items,
widget->right - widget->left - 3
);

View File

@ -472,7 +472,7 @@ static void window_research_funding_mousedown(int widgetIndex, rct_window *w, rc
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4,
dropdownWidget->right - dropdownWidget->left - 3
);

View File

@ -1697,7 +1697,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget)
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
0,
numItems,
widget->right - dropdownWidget->left
);
@ -2308,7 +2308,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
widget->right - dropdownWidget->left
);
@ -2321,7 +2321,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
ride->var_0CC,
widget->right - dropdownWidget->left
);
@ -2343,7 +2343,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
maxCars - minCars + 1,
widget->right - dropdownWidget->left
);
@ -2759,7 +2759,7 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget)
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numAvailableModes,
widget->right - dropdownWidget->left
);
@ -2791,7 +2791,7 @@ static void window_ride_load_dropdown(rct_window *w, rct_widget *widget)
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
5,
widget->right - dropdownWidget->left
);
@ -3323,7 +3323,7 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
7,
widget->right - dropdownWidget->left
);
@ -3676,7 +3676,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4,
widget->right - dropdownWidget->left
);
@ -3703,7 +3703,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4,
widget->right - dropdownWidget->left
);
@ -3725,7 +3725,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
countof(window_ride_entrance_style_list),
widget->right - dropdownWidget->left
);
@ -3743,7 +3743,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
rideEntry->max_cars_in_train > 1 ? 3 : 2,
widget->right - dropdownWidget->left
);
@ -3766,7 +3766,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
widget->right - dropdownWidget->left
);
@ -4337,7 +4337,7 @@ static void window_ride_music_mousedown(int widgetIndex, rct_window *w, rct_widg
w->y + dropdownWidget->top,
dropdownWidget->bottom - dropdownWidget->top + 1,
w->colours[1],
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems,
widget->right - dropdownWidget->left
);

View File

@ -253,7 +253,15 @@ static void window_ride_list_mousedown(int widgetIndex, rct_window*w, rct_widget
gDropdownItemsFormat[i] = 1142;
gDropdownItemsArgs[i] = STR_STATUS + i;
}
window_dropdown_show_text_custom_width(w->x + widget->left, w->y + widget->top, widget->bottom - widget->top, w->colours[1], 0x80, numItems, widget->right - widget->left - 3);
window_dropdown_show_text_custom_width(
w->x + widget->left,
w->y + widget->top,
widget->bottom - widget->top,
w->colours[1],
DROPDOWN_FLAG_STAY_OPEN,
numItems,
widget->right - widget->left - 3
);
gDropdownItemsChecked |= (1 << _window_ride_list_information_type);
}
}

View File

@ -30,6 +30,7 @@
#include "../world/footpath.h"
#include "../world/sprite.h"
#include "../world/scenery.h"
#include "../input.h"
#include "dropdown.h"
#include "error.h"
@ -375,7 +376,7 @@ void window_staff_overview_close()
window_get_register(w);
if (RCT2_GLOBAL(0x9DE518, uint32) & (1 << 3)){
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE){
if (w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass) &&
w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber))
tool_cancel();
@ -388,7 +389,7 @@ void window_staff_overview_close()
*/
void window_staff_set_page(rct_window* w, int page)
{
if (RCT2_GLOBAL(0x9DE518,uint32) & (1 << 3))
if (RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) & INPUT_FLAG_TOOL_ACTIVE)
{
if(w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber) &&
w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass))
@ -1356,7 +1357,7 @@ void window_staff_options_mousedown(int widgetIndex, rct_window* w, rct_widget*
int y = widget->top + w->y;
int extray = widget->bottom - widget->top + 1;
int width = widget->right - widget->left - 3;
window_dropdown_show_text_custom_width(x, y, extray, w->colours[1], 0x80, no_entries, width);
window_dropdown_show_text_custom_width(x, y, extray, w->colours[1], DROPDOWN_FLAG_STAY_OPEN, no_entries, width);
// See above note.
gDropdownItemsChecked = item_checked;

View File

@ -130,7 +130,7 @@ static void window_title_menu_mousedown(int widgetIndex, rct_window*w, rct_widge
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[0] | 0x80,
0x80,
DROPDOWN_FLAG_STAY_OPEN,
3
);
} else if (widgetIndex == WIDX_GAME_TOOLS) {
@ -143,7 +143,7 @@ static void window_title_menu_mousedown(int widgetIndex, rct_window*w, rct_widge
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[0] | 0x80,
0x80,
DROPDOWN_FLAG_STAY_OPEN,
4
);
}

View File

@ -347,7 +347,7 @@ static void window_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widg
w->y + widget->top,
widget->bottom - widget->top + 1,
w->colours[0] | 0x80,
0x80,
DROPDOWN_FLAG_STAY_OPEN,
numItems
);
break;