* Get colour to display text in for a given company slot. * @param cid Company to display. * @param max_slot Maximum company ID that can be an AI. * @returns Colour to display text for company. */
| 180 | * @returns Colour to display text for company. |
| 181 | */ |
| 182 | TextColour GetSlotColour(CompanyID cid, CompanyID max_slot) const |
| 183 | { |
| 184 | if (this->selected_slot == cid) return TC_WHITE; |
| 185 | if (IsEditable(cid)) return cid < max_slot ? TC_ORANGE : TC_SILVER; |
| 186 | if (Company::IsValidAiID(cid)) return TC_GREEN; |
| 187 | return TC_SILVER; |
| 188 | } |
| 189 | |
| 190 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 191 | { |