Add hints for creating packages.

This commit is contained in:
Dan Albert 2020-11-05 17:08:34 -08:00
parent 43eb041bb8
commit 5d579ccef9
2 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,4 @@
"""Widgets for displaying air tasking orders."""
import datetime
import logging
from contextlib import contextmanager
from typing import ContextManager, Optional
@ -22,6 +21,7 @@ from PySide2.QtWidgets import (
QAction,
QGroupBox,
QHBoxLayout,
QLabel,
QListView,
QMenu,
QPushButton,
@ -235,6 +235,12 @@ class QFlightPanel(QGroupBox):
self.vbox = QVBoxLayout()
self.setLayout(self.vbox)
self.tip = QLabel(
"To add flights to a package, edit the package by double clicking "
"it or pressing the edit button."
)
self.vbox.addWidget(self.tip)
self.flight_list = QFlightList(game_model, package_model)
self.vbox.addWidget(self.flight_list)
@ -437,6 +443,13 @@ class QPackagePanel(QGroupBox):
self.vbox = QVBoxLayout()
self.setLayout(self.vbox)
self.tip = QLabel(
"To create a new package, right click the mission target on the "
"map. To target airbase objectives, use\n"
"the attack button in the airbase view."
)
self.vbox.addWidget(self.tip)
self.package_list = QPackageList(self.ato_model)
self.vbox.addWidget(self.package_list)

View File

@ -73,7 +73,10 @@ class QLiberationWindow(QMainWindow):
hbox.addWidget(vbox)
vbox.addWidget(self.liberation_map)
vbox.addWidget(self.info_panel)
hbox.setSizes([100, 600])
# Will make the ATO sidebar as small as necessary to fit the content. In
# practice this means it is sized by the hints in the panel.
hbox.setSizes([1, 10000000])
vbox.setSizes([600, 100])
vbox = QVBoxLayout()