| 423 | } |
| 424 | |
| 425 | std::string GetPropertyString(const NIProperty &nip, uint value) const |
| 426 | { |
| 427 | switch (nip.type) { |
| 428 | case NIT_INT: return GetString(STR_JUST_INT, value); |
| 429 | case NIT_CARGO: return GetString(IsValidCargoType(value) ? CargoSpec::Get(value)->name : STR_QUANTITY_N_A); |
| 430 | default: NOT_REACHED(); |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | /** |
| 435 | * Helper function to draw the main panel widget. |
no test coverage detected