case WID_AIC_LIST: { int y = r.top; for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { StringID cid = STR_AI_CONFIG_AILIST_COMPANY_ID_1 + i; DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, cid); StringID text; if (_game_mode == GM_NORMAL && Company::IsValidHumanID(i)) { text = STR_AI_CONFIG_HUMAN_PLAYER; } else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) { SetDParamStr(0, AIConfig::GetConfig((CompanyID)i)->GetInfo()->GetName()); text = STR_JUST_RAW_STRING; } else { text = STR_AI_CONFIG_RANDOM_AI; } DrawString(r.left + 10 + 90, r.right - 10 - 90, y + WD_MATRIX_TOP, text, (this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? Company::IsValidAiID(i) ? IsDead((CompanyID)i) ? TC_RED : TC_GREEN : TC_ORANGE : TC_SILVER)); y += this->line_height; } break; }