mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Include control point name in ground object info.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/498
This commit is contained in:
parent
d2df795ba7
commit
ffcae66f59
@ -178,6 +178,7 @@ class ControlPointJs(QObject):
|
||||
|
||||
class GroundObjectJs(QObject):
|
||||
nameChanged = Signal()
|
||||
controlPointNameChanged = Signal()
|
||||
unitsChanged = Signal()
|
||||
blueChanged = Signal()
|
||||
positionChanged = Signal()
|
||||
@ -214,6 +215,10 @@ class GroundObjectJs(QObject):
|
||||
def name(self) -> str:
|
||||
return self.tgo.name
|
||||
|
||||
@Property(str, notify=controlPointNameChanged)
|
||||
def controlPointName(self) -> str:
|
||||
return self.tgo.control_point.name
|
||||
|
||||
@Property(str, notify=categoryChanged)
|
||||
def category(self) -> str:
|
||||
return self.tgo.category
|
||||
|
||||
@ -56,7 +56,9 @@ class QGroundObjectMenu(QDialog):
|
||||
self.buildings = buildings
|
||||
self.cp = cp
|
||||
self.game = game
|
||||
self.setWindowTitle("Location " + self.ground_object.obj_name)
|
||||
self.setWindowTitle(
|
||||
f"Location - {self.ground_object.obj_name} ({self.cp.name})"
|
||||
)
|
||||
self.setWindowIcon(EVENT_ICONS["capture"])
|
||||
self.intelBox = QGroupBox("Units :")
|
||||
self.buildingBox = QGroupBox("Buildings :")
|
||||
|
||||
@ -570,7 +570,7 @@ class TheaterGroundObject {
|
||||
}
|
||||
|
||||
L.marker(this.tgo.position, { icon: this.icon() })
|
||||
.bindTooltip(`${this.tgo.name}<br />${this.tgo.units.join("<br />")}`)
|
||||
.bindTooltip(`${this.tgo.name} (${this.tgo.controlPointName})<br />${this.tgo.units.join("<br />")}`)
|
||||
.on("click", () => this.tgo.showInfoDialog())
|
||||
.on("contextmenu", () => this.tgo.showPackageDialog())
|
||||
.addTo(this.layer());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user