diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index e0ef7cf386..8df3c1c292 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -4089,6 +4089,8 @@ STR_5781 :Running cost: Unknown STR_5782 :You are now connected. Press '{STRING}' to chat. STR_5783 :{WINDOW_COLOUR_2}Scenario Locked STR_5784 :{BLACK}Complete earlier scenarios to unlock this scenario. +STR_5785 :Can't rename group... +STR_5786 :Invalid group name ############# # Scenarios # diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 58163d8211..4cc931030e 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -2401,6 +2401,9 @@ enum { STR_SCENARIO_LOCKED = 5783, STR_SCENARIO_LOCKED_DESC = 5784, + + STR_CANT_RENAME_GROUP = 5785, + STR_INVALID_GROUP_NAME = 5786, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 diff --git a/src/network/network.cpp b/src/network/network.cpp index 8d1e564f2e..00f4176845 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -2330,7 +2330,8 @@ void game_command_modify_groups(int *eax, int *ebx, int *ecx, int *edx, int *esi } if (newName[0] == 0) { - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_INVALID_RIDE_ATTRACTION_NAME; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_RENAME_GROUP; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_INVALID_GROUP_NAME; *ebx = MONEY32_UNDEFINED; return; } diff --git a/src/windows/multiplayer.c b/src/windows/multiplayer.c index 4eda192be8..10c0eaf740 100644 --- a/src/windows/multiplayer.c +++ b/src/windows/multiplayer.c @@ -472,8 +472,10 @@ static void window_multiplayer_groups_mouseup(rct_window *w, int widgetIndex) case WIDX_REMOVE_GROUP: game_do_command(1 | (_selectedGroup << 8), GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_MODIFY_GROUPS, 0, 0); break; - case WIDX_RENAME_GROUP: - window_text_input_open(w, widgetIndex, STR_GROUP_NAME, STR_ENTER_NEW_NAME_FOR_THIS_GROUP, 0, 0, 32); + case WIDX_RENAME_GROUP:; + int groupIndex = network_get_group_index(_selectedGroup); + utf8 *groupName = network_get_group_name(groupIndex); + window_text_input_raw_open(w, widgetIndex, STR_GROUP_NAME, STR_ENTER_NEW_NAME_FOR_THIS_GROUP, groupName, 32); break; } }