| 1528 | } |
| 1529 | |
| 1530 | static void languageDropdown(Window& self, int16_t itemIndex) |
| 1531 | { |
| 1532 | if (itemIndex == -1) |
| 1533 | { |
| 1534 | self.invalidate(); |
| 1535 | return; |
| 1536 | } |
| 1537 | |
| 1538 | const auto lds = Localisation::getLanguageDescriptors(); |
| 1539 | const auto& ld = lds[itemIndex + 1]; |
| 1540 | Config::get().language = ld.locale; |
| 1541 | Config::write(); |
| 1542 | Localisation::loadLanguageFile(); |
| 1543 | // Reloading the objects will force objects to load the new language |
| 1544 | ObjectManager::reloadAll(); |
| 1545 | Gfx::invalidateScreen(); |
| 1546 | |
| 1547 | // Rebuild the scenario index to use the new language. |
| 1548 | ScenarioManager::loadIndex(true); |
| 1549 | } |
| 1550 | |
| 1551 | // 0x004C0C73 |
| 1552 | static void currencyMouseDown(const Window& self) |
no test coverage detected