5 | @@ -751,6 +751,23 @@
| 5 | @@ -685,7 +685,10 @@
|
---|
| | 6 | EndContainer(),
|
---|
| | 7 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
---|
| | 8 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
|
---|
| | 9 | - NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
|
---|
| | 10 | + NWidget(NWID_SELECTION, INVALID_COLOUR, WID_AIC_SELECT_CONFIGURE),
|
---|
| | 11 | + NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
|
---|
| | 12 | + NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_SETTINGS), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_DEBUG_SETTINGS, STR_AI_DEBUG_SETTINGS_TOOLTIP),
|
---|
| | 13 | + EndContainer(),
|
---|
| | 14 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
|
---|
| | 15 | EndContainer(),
|
---|
| | 16 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
---|
| | 17 | @@ -751,6 +754,34 @@
|
---|
22 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_CONFIG_CONFIGURE_SETTINGS : STR_AI_CONFIG_CONFIGURE_CONFIGURE);
| 32 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE);
|
---|
23 | + SetDParam(1, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_CONFIG_CONFIGURE_SETTINGS_TOOLTIP : STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP);
| 33 | + break;
|
---|
24 | + break;
| 34 | + }
|
---|
| | 35 | + case WID_AIC_SETTINGS:
|
---|
| | 36 | + switch (selected_slot) {
|
---|
| | 37 | + case OWNER_DEITY:
|
---|
| | 38 | + SetDParam(0, _game_mode == GM_NORMAL ? IsEditable(this->selected_slot) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE : STR_AI_CONFIG_CONFIGURE);
|
---|
| | 39 | + break;
|
---|
| | 40 | +
|
---|
| | 41 | + case INVALID_COMPANY:
|
---|
| | 42 | + SetDParam(0, STR_AI_DEBUG_SETTINGS);
|
---|
| | 43 | + break;
|
---|
| | 44 | +
|
---|
| | 45 | + default:
|
---|
| | 46 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE);
|
---|
| | 47 | + break;
|
---|
31 | --- src/lang/english.txt (revision 27548)
| 31 | --- src/widgets/ai_widget.h (revision 27548)
|
---|
32 | +++ src/lang/english.txt (working copy)
| 32 | +++ src/widgets/ai_widget.h (working copy)
|
---|
33 | @@ -3999,8 +3999,12 @@
| 33 | @@ -46,7 +46,11 @@
|
---|
34 | STR_AI_CONFIG_CHANGE_AI :AI
| 34 | WID_AIC_MOVE_UP, ///< Move up button.
|
---|
35 | STR_AI_CONFIG_CHANGE_GAMESCRIPT :Game Script
| 35 | WID_AIC_MOVE_DOWN, ///< Move down button.
|
---|
36 | STR_AI_CONFIG_CHANGE_TOOLTIP :{BLACK}Load another script
| 36 | WID_AIC_CHANGE, ///< Select another AI button.
|
---|
37 | -STR_AI_CONFIG_CONFIGURE :{BLACK}Configure
| 37 | - WID_AIC_CONFIGURE, ///< Change AI settings button.
|
---|
38 | -STR_AI_CONFIG_CONFIGURE_TOOLTIP :{BLACK}Configure the parameters of the Script
| 38 | +
|
---|
39 | +STR_AI_CONFIG_CONFIGURE :{STRING}
| 39 | + WID_AIC_SELECT_CONFIGURE, ///< Change AI settings button.
|
---|
40 | +STR_AI_CONFIG_CONFIGURE_TOOLTIP :{STRING}
| 40 | + WID_AIC_CONFIGURE, ///< Configure button.
|
---|
41 | +STR_AI_CONFIG_CONFIGURE_CONFIGURE :{BLACK}Configure
| 41 | + WID_AIC_SETTINGS, ///< Settings button.
|
---|
42 | +STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP :{BLACK}Configure the parameters of the Script
| 42 | +
|
---|
43 | +STR_AI_CONFIG_CONFIGURE_SETTINGS :{BLACK}Settings
| 43 | WID_AIC_CLOSE, ///< Close window button.
|
---|
44 | +STR_AI_CONFIG_CONFIGURE_SETTINGS_TOOLTIP :{BLACK}Change the settings of the script
| 44 | WID_AIC_TEXTFILE, ///< Open AI readme, changelog (+1) or license (+2).
|
---|
45 |
| 45 | WID_AIC_CONTENT_DOWNLOAD = WID_AIC_TEXTFILE + TFT_END, ///< Download content button. |
---|
46 | # Available AIs window
| | |
---|
47 | STR_AI_LIST_CAPTION :{WHITE}Available {STRING} | | |
---|