mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Invert factions when "Invert Map" is set in NGW
This commit is contained in:
parent
ae17f195fe
commit
e2d9a794b8
@ -46,6 +46,7 @@
|
|||||||
* **[Plugins]** Updated CTLD to latest released version
|
* **[Plugins]** Updated CTLD to latest released version
|
||||||
* **[Options]** Renamed Maximum frontline length -> Maximum frontline width.
|
* **[Options]** Renamed Maximum frontline length -> Maximum frontline width.
|
||||||
* **[Squadrons]** Add livery selector in Squadron Dialog, allowing you to change the livery during the campaign.
|
* **[Squadrons]** Add livery selector in Squadron Dialog, allowing you to change the livery during the campaign.
|
||||||
|
* **[New Game Wizard]** Automatically invert factions when 'Invert Map' is selected.
|
||||||
|
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|||||||
@ -118,10 +118,11 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
|
|||||||
# Campaign settings
|
# Campaign settings
|
||||||
mapSettingsGroup = QtWidgets.QGroupBox("Map Settings")
|
mapSettingsGroup = QtWidgets.QGroupBox("Map Settings")
|
||||||
mapSettingsLayout = QtWidgets.QGridLayout()
|
mapSettingsLayout = QtWidgets.QGridLayout()
|
||||||
invertMap = QtWidgets.QCheckBox()
|
self.invertMap = QtWidgets.QCheckBox()
|
||||||
self.registerField("invertMap", invertMap)
|
self.invertMap.stateChanged.connect(self.on_invert_map)
|
||||||
|
self.registerField("invertMap", self.invertMap)
|
||||||
mapSettingsLayout.addWidget(QtWidgets.QLabel("Invert Map"), 0, 0)
|
mapSettingsLayout.addWidget(QtWidgets.QLabel("Invert Map"), 0, 0)
|
||||||
mapSettingsLayout.addWidget(invertMap, 0, 1)
|
mapSettingsLayout.addWidget(self.invertMap, 0, 1)
|
||||||
self.advanced_iads = QtWidgets.QCheckBox()
|
self.advanced_iads = QtWidgets.QCheckBox()
|
||||||
self.registerField("advanced_iads", self.advanced_iads)
|
self.registerField("advanced_iads", self.advanced_iads)
|
||||||
self.iads_label = QtWidgets.QLabel("Advanced IADS (WIP)")
|
self.iads_label = QtWidgets.QLabel("Advanced IADS (WIP)")
|
||||||
@ -178,6 +179,8 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
|
|||||||
|
|
||||||
self.campaignMapDescription.setText(template.render({"campaign": campaign}))
|
self.campaignMapDescription.setText(template.render({"campaign": campaign}))
|
||||||
self.faction_selection.setDefaultFactions(campaign)
|
self.faction_selection.setDefaultFactions(campaign)
|
||||||
|
if self.invertMap.isChecked():
|
||||||
|
self.on_invert_map()
|
||||||
self.performanceText.setText(
|
self.performanceText.setText(
|
||||||
template_perf.render({"performance": campaign.performance})
|
template_perf.render({"performance": campaign.performance})
|
||||||
)
|
)
|
||||||
@ -243,6 +246,12 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
|
|||||||
layout.addWidget(timeGroup, 3, 1, 3, 1)
|
layout.addWidget(timeGroup, 3, 1, 3, 1)
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
|
def on_invert_map(self) -> None:
|
||||||
|
blue = self.faction_selection.blueFactionSelect.currentIndex()
|
||||||
|
red = self.faction_selection.redFactionSelect.currentIndex()
|
||||||
|
self.faction_selection.blueFactionSelect.setCurrentIndex(red)
|
||||||
|
self.faction_selection.redFactionSelect.setCurrentIndex(blue)
|
||||||
|
|
||||||
|
|
||||||
class QCampaignItem(QStandardItem):
|
class QCampaignItem(QStandardItem):
|
||||||
def __init__(self, campaign: Campaign) -> None:
|
def __init__(self, campaign: Campaign) -> None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user