mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
fix dropdown menu position in scrolled list
This commit is contained in:
@@ -218,8 +218,8 @@ static void window_player_list_scrollmousedown(rct_window *w, int scrollIndex, i
|
||||
window_invalidate(w);
|
||||
|
||||
rct_widget *listWidget = &w->widgets[WIDX_LIST];
|
||||
int ddx = w->x + listWidget->left + x;
|
||||
int ddy = w->y + listWidget->top + y;
|
||||
int ddx = w->x + listWidget->left + x - w->scrolls[0].h_left;
|
||||
int ddy = w->y + listWidget->top + y - w->scrolls[0].v_top;
|
||||
|
||||
if (index == 0) {
|
||||
return;
|
||||
|
||||
@@ -277,8 +277,8 @@ static void window_server_list_scroll_mousedown(rct_window *w, int scrollIndex,
|
||||
char *serverAddress = _savedServers[serverIndex].address;
|
||||
|
||||
rct_widget *listWidget = &w->widgets[WIDX_LIST];
|
||||
int ddx = w->x + listWidget->left + x + 2;
|
||||
int ddy = w->y + listWidget->top + y + 2;
|
||||
int ddx = w->x + listWidget->left + x + 2 - w->scrolls[0].h_left;
|
||||
int ddy = w->y + listWidget->top + y + 2 - w->scrolls[0].v_top;
|
||||
|
||||
gDropdownItemsFormat[0] = STR_JOIN_GAME;
|
||||
if (_savedServers[serverIndex].favorite) {
|
||||
|
||||
Reference in New Issue
Block a user