5 | @@ -685,7 +685,10 @@
| 5 | @@ -751,6 +751,20 @@
|
---|
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 @@
| | |
---|
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);
| 32 | +
|
---|
33 | + 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);
| | |
---|
50 | }
| 50 | } |
---|
51 |
| | |
---|
52 | Index: src/widgets/ai_widget.h
| | |
---|
53 | ===================================================================
| | |
---|
54 | --- src/widgets/ai_widget.h (revision 27548)
| | |
---|
55 | +++ src/widgets/ai_widget.h (working copy)
| | |
---|
56 | @@ -46,7 +46,11 @@
| | |
---|
57 | WID_AIC_MOVE_UP, ///< Move up button.
| | |
---|
58 | WID_AIC_MOVE_DOWN, ///< Move down button.
| | |
---|
59 | WID_AIC_CHANGE, ///< Select another AI button.
| | |
---|
60 | - WID_AIC_CONFIGURE, ///< Change AI settings button.
| | |
---|
61 | +
| | |
---|
62 | + WID_AIC_SELECT_CONFIGURE, ///< Change AI settings button.
| | |
---|
63 | + WID_AIC_CONFIGURE, ///< Configure button.
| | |
---|
64 | + WID_AIC_SETTINGS, ///< Settings button.
| | |
---|
65 | +
| | |
---|
66 | WID_AIC_CLOSE, ///< Close window button.
| | |
---|
67 | WID_AIC_TEXTFILE, ///< Open AI readme, changelog (+1) or license (+2).
| | |
---|
68 | WID_AIC_CONTENT_DOWNLOAD = WID_AIC_TEXTFILE + TFT_END, ///< Download content button. | | |
---|