Old revision #pdn5yogmn | New revision #pvaqviyqt | ||
---|---|---|---|
1 | /// Somewhere in english.txt | ||
2 | STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Parameters of {RAW_STRING} | ||
3 | |||
4 | /// Somewhere in AI Settings Window widget construction | ||
5 | NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_AIS_CAPTION), SetDataTip(STR_AI_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), | ||
6 | |||
7 | /// Somewhere in AI Settings Window | ||
1 | virtual void SetStringParameters(int widget) const | 8 | virtual void SetStringParameters(int widget) const |
2 | { | 9 | { |
3 | switch (widget) { | 10 | switch (widget) { | … | … |
6 | 13 | ||
7 | StringID text; | 14 | StringID text; |
8 | if (GetConfig(this->slot)->GetInfo() != NULL) { | 15 | if (GetConfig(this->slot)->GetInfo() != NULL) { |
9 | SetDParamStr( | 9 | SetDParamStr(2, GetConfig(this->slot)->GetInfo()->GetName()); |
10 | text = STR_JUST_RAW_STRING; | 17 | text = STR_JUST_RAW_STRING; |
11 | } else { | 18 | } else { |
12 | text = (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI; | 19 | text = (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI; |
13 | // char name[1024]; | 20 | // char name[1024]; |
14 | // GetString(name, (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, lastof(name)); | 21 | // GetString(name, (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, lastof(name)); |
15 | // const char *script_name = stredup(name); | 22 | // const char *script_name = stredup(name); |
16 | // SetDParam | 16 | // SetDParamStr(1, (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI); |
17 | } | 24 | } |
25 | SetDParam(1, text); | ||
18 | } | 26 | } |
19 | } | 27 | } |