| 976 | } |
| 977 | |
| 978 | void CityView::setSelectedTab(int tabIndex) |
| 979 | { |
| 980 | if (tabIndex < 0 || tabIndex > uiTabs.size()) |
| 981 | { |
| 982 | LogError("Trying to select invalid tab: %d", tabIndex); |
| 983 | return; |
| 984 | } |
| 985 | for (auto tab : uiTabs) |
| 986 | { |
| 987 | tab->setVisible(false); |
| 988 | } |
| 989 | uiTabs[tabIndex]->setVisible(true); |
| 990 | this->activeTab = uiTabs[tabIndex]; |
| 991 | this->state->current_city->cityViewPageIndex = tabIndex; |
| 992 | } |
| 993 | |
| 994 | CityView::CityView(sp<GameState> state) |
| 995 | : CityTileView(*state->current_city->map, Vec3<int>{TILE_X_CITY, TILE_Y_CITY, TILE_Z_CITY}, |
no test coverage detected