| 3335 | } |
| 3336 | |
| 3337 | void Framework::OnPowerFacilityChanged(power_management::Facility const facility, bool enabled) |
| 3338 | { |
| 3339 | if (facility == power_management::Facility::PerspectiveView || facility == power_management::Facility::Buildings3d) |
| 3340 | { |
| 3341 | bool allow3d = true, allow3dBuildings = true; |
| 3342 | Load3dMode(allow3d, allow3dBuildings); |
| 3343 | |
| 3344 | if (facility == power_management::Facility::PerspectiveView) |
| 3345 | allow3d = allow3d && enabled; |
| 3346 | else |
| 3347 | allow3dBuildings = allow3dBuildings && enabled; |
| 3348 | |
| 3349 | Allow3dMode(allow3d, allow3dBuildings); |
| 3350 | } |
| 3351 | else if (facility == power_management::Facility::TrafficJams) |
| 3352 | { |
| 3353 | auto trafficState = enabled && LoadTrafficEnabled(); |
| 3354 | if (trafficState == GetTrafficManager().IsEnabled()) |
| 3355 | return; |
| 3356 | |
| 3357 | GetTrafficManager().SetEnabled(trafficState); |
| 3358 | } |
| 3359 | } |
| 3360 | |
| 3361 | void Framework::OnPowerSchemeChanged(power_management::Scheme const actualScheme) |
| 3362 | { |
nothing calls this directly
no test coverage detected