mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Implemented basic base menu to buy units
This commit is contained in:
@@ -5,14 +5,16 @@ from PySide2.QtWidgets import QGraphicsRectItem, QGraphicsSceneHoverEvent, QGrap
|
||||
|
||||
from qt_ui.windows.QBaseMenu import QBaseMenu
|
||||
from theater import ControlPoint
|
||||
from game import Game
|
||||
import qt_ui.uiconstants as CONST
|
||||
|
||||
|
||||
class QMapControlPoint(QGraphicsRectItem):
|
||||
|
||||
def __init__(self, parent, x: float, y: float, w: float, h: float, model: ControlPoint):
|
||||
def __init__(self, parent, x: float, y: float, w: float, h: float, model: ControlPoint, game: Game):
|
||||
super(QMapControlPoint, self).__init__(x, y, w, h)
|
||||
self.model = model
|
||||
self.game = game
|
||||
self.parent = parent
|
||||
self.setAcceptHoverEvents(True)
|
||||
self.setZValue(1)
|
||||
@@ -77,5 +79,5 @@ class QMapControlPoint(QGraphicsRectItem):
|
||||
return self.model.captured and CONST.COLORS["bright_red"] or CONST.COLORS["dark_blue"]
|
||||
|
||||
def openBaseMenu(self):
|
||||
window = QBaseMenu(self.window(), self.model)
|
||||
window.show()
|
||||
self.baseMenu = QBaseMenu(self.window(), self.model, self.game)
|
||||
self.baseMenu.show()
|
||||
Reference in New Issue
Block a user