mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Show player slots in the overview.
This commit is contained in:
@@ -77,7 +77,7 @@ class QLiberationWindow(QMainWindow):
|
||||
|
||||
vbox = QVBoxLayout()
|
||||
vbox.setMargin(0)
|
||||
vbox.addWidget(QTopPanel(self.game))
|
||||
vbox.addWidget(QTopPanel(self.game_model))
|
||||
vbox.addWidget(hbox)
|
||||
|
||||
central_widget = QWidget()
|
||||
|
||||
@@ -4,9 +4,9 @@ from PySide2.QtWidgets import (
|
||||
QVBoxLayout,
|
||||
)
|
||||
|
||||
from game import Game
|
||||
from gen.ato import Package
|
||||
from gen.flights.flight import Flight
|
||||
from qt_ui.models import GameModel
|
||||
from qt_ui.uiconstants import EVENT_ICONS
|
||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||
from qt_ui.windows.mission.flight.QFlightPlanner import QFlightPlanner
|
||||
@@ -15,22 +15,22 @@ from qt_ui.windows.mission.flight.QFlightPlanner import QFlightPlanner
|
||||
class QEditFlightDialog(QDialog):
|
||||
"""Dialog window for editing flight plans and loadouts."""
|
||||
|
||||
def __init__(self, game: Game, package: Package, flight: Flight) -> None:
|
||||
def __init__(self, game_model: GameModel, package: Package, flight: Flight) -> None:
|
||||
super().__init__()
|
||||
|
||||
self.game = game
|
||||
self.game_model = game_model
|
||||
|
||||
self.setWindowTitle("Create flight")
|
||||
self.setWindowIcon(EVENT_ICONS["strike"])
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
||||
self.flight_planner = QFlightPlanner(package, flight, game)
|
||||
self.flight_planner = QFlightPlanner(package, flight, game_model.game)
|
||||
layout.addWidget(self.flight_planner)
|
||||
|
||||
self.setLayout(layout)
|
||||
self.finished.connect(self.on_close)
|
||||
|
||||
@staticmethod
|
||||
def on_close(_result) -> None:
|
||||
def on_close(self, _result) -> None:
|
||||
GameUpdateSignal.get_instance().redraw_flight_paths()
|
||||
self.game_model.ato_model.client_slots_changed.emit()
|
||||
|
||||
Reference in New Issue
Block a user