Added loadout editor to mission preparation screen.

This commit is contained in:
Khopa
2019-10-19 16:14:40 +02:00
parent 48a40f2511
commit 9f319ab99a
15 changed files with 180 additions and 44 deletions

View File

@@ -24,7 +24,6 @@ class QTopPanel(QFrame):
self.turnCounter = QTurnCounter()
self.budgetBox = QBudgetBox()
self.passTurnButton = QPushButton("Pass Turn")
self.passTurnButton.setIcon(CONST.ICONS["PassTurn"])
self.passTurnButton.setProperty("style", "btn-primary")
@@ -34,6 +33,9 @@ class QTopPanel(QFrame):
self.proceedButton.setIcon(CONST.ICONS["PassTurn"])
self.proceedButton.setProperty("style", "btn-primary")
self.proceedButton.clicked.connect(self.proceed)
if self.game.turn == 0:
self.proceedButton.setEnabled(False)
self.submenus = QVBoxLayout()
self.settings = QPushButton("Settings")
@@ -75,6 +77,7 @@ class QTopPanel(QFrame):
def passTurn(self):
self.game.pass_turn()
GameUpdateSignal.get_instance().updateGame(self.game)
self.proceedButton.setEnabled(True)
def proceed(self):
self.subwindow = QMissionPlanning(self.game)

View File

@@ -125,8 +125,8 @@ class QLiberationMap(QGraphicsView):
for flight in planner.flights:
scene.addEllipse(pos[0], pos[1], 4, 4)
prev_pos = list(pos)
for points in flight.points:
new_pos = self._transform_point(Point(points[0], points[1]))
for point in flight.points:
new_pos = self._transform_point(Point(point.x, point.y))
scene.addLine(prev_pos[0]+2, prev_pos[1]+2, new_pos[0]+2, new_pos[1]+2, flight_path_pen)
scene.addEllipse(new_pos[0], new_pos[1], 4, 4, pen, brush)
prev_pos = list(new_pos)