mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
fix #3053: Long multiplayer group names overflow the dropdown
This commit is contained in:
@@ -616,13 +616,14 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp
|
|||||||
int group = network_get_group_index(network_get_default_group());
|
int group = network_get_group_index(network_get_default_group());
|
||||||
if (group != -1) {
|
if (group != -1) {
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(group);
|
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(group);
|
||||||
gfx_draw_string_centred(
|
gfx_draw_string_centred_clipped(
|
||||||
dpi,
|
dpi,
|
||||||
1193,
|
1193,
|
||||||
|
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
|
||||||
|
0,
|
||||||
w->x + (widget->left + widget->right - 11) / 2,
|
w->x + (widget->left + widget->right - 11) / 2,
|
||||||
w->y + widget->top,
|
w->y + widget->top,
|
||||||
0,
|
widget->right - widget->left - 8
|
||||||
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,13 +640,14 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp
|
|||||||
group = network_get_group_index(_selectedGroup);
|
group = network_get_group_index(_selectedGroup);
|
||||||
if (group != -1) {
|
if (group != -1) {
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(group);
|
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(group);
|
||||||
gfx_draw_string_centred(
|
gfx_draw_string_centred_clipped(
|
||||||
dpi,
|
dpi,
|
||||||
1193,
|
1193,
|
||||||
|
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
|
||||||
|
0,
|
||||||
w->x + (widget->left + widget->right - 11) / 2,
|
w->x + (widget->left + widget->right - 11) / 2,
|
||||||
w->y + widget->top,
|
w->y + widget->top,
|
||||||
0,
|
widget->right - widget->left - 8
|
||||||
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -371,13 +371,14 @@ void window_player_overview_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||||||
rct_widget* widget = &window_player_overview_widgets[WIDX_GROUP];
|
rct_widget* widget = &window_player_overview_widgets[WIDX_GROUP];
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(groupindex);
|
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = network_get_group_name_string_id(groupindex);
|
||||||
|
|
||||||
gfx_draw_string_centred(
|
gfx_draw_string_centred_clipped(
|
||||||
dpi,
|
dpi,
|
||||||
1193,
|
1193,
|
||||||
|
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
|
||||||
|
0,
|
||||||
w->x + (widget->left + widget->right - 11) / 2,
|
w->x + (widget->left + widget->right - 11) / 2,
|
||||||
w->y + widget->top,
|
w->y + widget->top,
|
||||||
0,
|
widget->right - widget->left - 8
|
||||||
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user