Add Cloud Base Altitude to Weather Display (#1371)

Adds tooltip with cloud base altitude to weather panel
This commit is contained in:
Chris Seagraves 2021-06-30 14:22:14 -05:00 committed by GitHub
parent 5f5b5f69e3
commit f80696b724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Saves from 4.0.0 are compatible with 4.0.1.
## Features/Improvements
* **[UI]** Hovering over the weather information now dispalys the cloud base (meters and feet).
* **[UI]** Google search link added to unit information when there is no information provided.
## Fixes

View File

@ -13,6 +13,7 @@ import qt_ui.uiconstants as CONST
from game import Game
from game.event.airwar import AirWarEvent
from game.profiling import logged_duration
from game.utils import meters
from gen.ato import Package
from gen.flights.traveltime import TotEstimator
from qt_ui.models import GameModel
@ -112,6 +113,11 @@ class QTopPanel(QFrame):
self.transfers.setEnabled(True)
self.conditionsWidget.setCurrentTurn(game.turn, game.conditions)
base_m = game.conditions.weather.clouds.base
base_ft = int(meters(base_m).feet)
self.conditionsWidget.setToolTip(f"Cloud Base: {base_m}m / {base_ft}ft")
self.intel_box.set_game(game)
self.budgetBox.setGame(game)
self.factionsInfos.setGame(game)