mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
improve group renaming
This commit is contained in:
@@ -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 #
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user