/// Somewhere in english.txt
STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Parameters of {RAW_STRING}
/// Somewhere in AI Settings Window widget construction
NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_AIS_CAPTION), SetDataTip(STR_AI_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
/// Somewhere in AI Settings Window
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_AIS_CAPTION:
SetDParam(0, (this->slot == OWNER_DEITY) ? STR_AI_SETTINGS_CAPTION_GAMESCRIPT : STR_AI_SETTINGS_CAPTION_AI);
StringID text;
if (GetConfig(this->slot)->GetInfo() != NULL) {
SetDParamStr(2, GetConfig(this->slot)->GetInfo()->GetName());
text = STR_JUST_RAW_STRING;
} else {
text = (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI;
// char name[1024];
// GetString(name, (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, lastof(name));
// const char *script_name = stredup(name);
// SetDParamStr(1, (slot == OWNER_DEITY) ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI);
}
SetDParam(1, text);
}
}