From c89416702d7f9153212e4af45f79d3c735c09805 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 1 Jul 2021 20:02:29 -0700 Subject: [PATCH] Revert "Revert "Add Cloud Base Altitude to Weather Display (#1371)"" This reverts commit b2dd8c68e1aa7cb9e009777cc6e6a06272496dca. --- changelog.md | 2 ++ qt_ui/widgets/QTopPanel.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/changelog.md b/changelog.md index 69f5dd8d..09058d82 100644 --- a/changelog.md +++ b/changelog.md @@ -12,7 +12,9 @@ Saves from 4.0.0 are compatible with 4.0.1. ## Features/Improvements * **[Plugins]** Increased time JTAC Autolase messages stay visible on the UI. + * **[UI]** Added ability to take notes and have those notes appear as a kneeboard page. +* **[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 diff --git a/qt_ui/widgets/QTopPanel.py b/qt_ui/widgets/QTopPanel.py index a00b6044..83959b12 100644 --- a/qt_ui/widgets/QTopPanel.py +++ b/qt_ui/widgets/QTopPanel.py @@ -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)