| 35 | } |
| 36 | |
| 37 | void MultiplayerGameModeSelectSection::OnShow(IMenuContainer* root) |
| 38 | { |
| 39 | ScrollableMenuSection::OnShow(root); |
| 40 | |
| 41 | if (auto* underlyingSection = dynamic_cast<CreateServerOptionsSection*>(_root->GetUnderlyingSection())) { |
| 42 | auto gameMode = underlyingSection->GetGameMode(); |
| 43 | for (std::size_t i = 0; i < _items.size(); i++) { |
| 44 | if (_items[i].Item.Mode == gameMode) { |
| 45 | _selectedIndex = (std::int32_t)i; |
| 46 | break; |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void MultiplayerGameModeSelectSection::OnDraw(Canvas* canvas) |
| 53 | { |
nothing calls this directly
no test coverage detected