Merge remote-tracking branch 'khopa/develop' into develop

This commit is contained in:
Khopa 2021-01-30 01:30:00 +01:00
commit 9780798b75
3 changed files with 28 additions and 5 deletions

View File

@ -27,6 +27,7 @@ Saves from 2.3 are not compatible with 2.4.
* **[UI]** Default loadout is now shown for flights with no custom loadout selected. * **[UI]** Default loadout is now shown for flights with no custom loadout selected.
* **[UI]** Aircraft for a new flight are now only selectable if they match the task type for that flight. * **[UI]** Aircraft for a new flight are now only selectable if they match the task type for that flight.
* **[UI]** WIP - There is now a unit info button for each unit in the recruitment list, that should help newer players learn what each unit does. * **[UI]** WIP - There is now a unit info button for each unit in the recruitment list, that should help newer players learn what each unit does.
* **[UI]** Docs for creating new theaters/factions/loadouts are now linked in the UI at the appropriate places.
* **[Factions]** Added option for date-based loadout restriction. Active radar homing missiles are handled, patches welcome for the other thousand weapons. * **[Factions]** Added option for date-based loadout restriction. Active radar homing missiles are handled, patches welcome for the other thousand weapons.
* **[Factions]** Added Poland 2010 faction. * **[Factions]** Added Poland 2010 faction.
* **[Factions]** Added Greece 2005 faction. * **[Factions]** Added Greece 2005 faction.

View File

@ -1,4 +1,5 @@
from PySide2.QtWidgets import QFrame, QGridLayout from PySide2.QtWidgets import QFrame, QGridLayout, QLabel
from PySide2.QtCore import Qt
from game import Game from game import Game
from gen.flights.flight import Flight from gen.flights.flight import Flight
@ -15,5 +16,13 @@ class QFlightPayloadTab(QFrame):
def init_ui(self): def init_ui(self):
layout = QGridLayout() layout = QGridLayout()
# Docs Link
docsText = QLabel("<a href=\"https://github.com/Khopa/dcs_liberation/wiki/Custom-Loadouts\"><span style=\"color:#FFFFFF;\">How to create your own default loadout</span></a>")
docsText.setAlignment(Qt.AlignCenter)
docsText.setOpenExternalLinks(True)
layout.addWidget(self.payload_editor) layout.addWidget(self.payload_editor)
layout.addWidget(docsText)
self.setLayout(layout) self.setLayout(layout)

View File

@ -5,7 +5,7 @@ from typing import List, Optional
from PySide2 import QtGui, QtWidgets from PySide2 import QtGui, QtWidgets
from PySide2.QtCore import QItemSelectionModel, QPoint, Qt from PySide2.QtCore import QItemSelectionModel, QPoint, Qt
from PySide2.QtWidgets import QVBoxLayout, QTextEdit from PySide2.QtWidgets import QVBoxLayout, QTextEdit, QLabel
from jinja2 import Environment, FileSystemLoader, select_autoescape from jinja2 import Environment, FileSystemLoader, select_autoescape
from game import db from game import db
@ -178,10 +178,16 @@ class FactionSelection(QtWidgets.QWizardPage):
# Create required mod layout # Create required mod layout
self.requiredModsGroup = QtWidgets.QGroupBox("Required Mods") self.requiredModsGroup = QtWidgets.QGroupBox("Required Mods")
self.requiredModsGroupLayout = QtWidgets.QHBoxLayout() self.requiredModsGroupLayout = QtWidgets.QHBoxLayout()
self.requiredMods = QtWidgets.QLabel("<ul><li>None</li></ul>") self.requiredMods = QtWidgets.QLabel("<ul><li>None</li></ul>")
self.requiredMods.setOpenExternalLinks(True)
self.requiredModsGroupLayout.addWidget(self.requiredMods) self.requiredModsGroupLayout.addWidget(self.requiredMods)
self.requiredModsGroup.setLayout(self.requiredModsGroupLayout) self.requiredModsGroup.setLayout(self.requiredModsGroupLayout)
# Docs Link
docsText = QtWidgets.QLabel("<a href=\"https://github.com/Khopa/dcs_liberation/wiki/Custom-Factions\"><span style=\"color:#FFFFFF;\">How to create your own faction</span></a>")
docsText.setAlignment(Qt.AlignCenter)
docsText.setOpenExternalLinks(True)
# Link form fields # Link form fields
self.registerField('blueFaction', self.blueFactionSelect) self.registerField('blueFaction', self.blueFactionSelect)
self.registerField('redFaction', self.redFactionSelect) self.registerField('redFaction', self.redFactionSelect)
@ -190,6 +196,7 @@ class FactionSelection(QtWidgets.QWizardPage):
layout = QtWidgets.QVBoxLayout() layout = QtWidgets.QVBoxLayout()
layout.addWidget(self.factionsGroup) layout.addWidget(self.factionsGroup)
layout.addWidget(self.requiredModsGroup) layout.addWidget(self.requiredModsGroup)
layout.addWidget(docsText)
self.setLayout(layout) self.setLayout(layout)
self.updateUnitRecap() self.updateUnitRecap()
@ -311,6 +318,11 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
timePeriod.setBuddy(timePeriodSelect) timePeriod.setBuddy(timePeriodSelect)
timePeriodSelect.setCurrentIndex(21) timePeriodSelect.setCurrentIndex(21)
# Docs Link
docsText = QtWidgets.QLabel("<a href=\"https://github.com/Khopa/dcs_liberation/wiki/Custom-Campaigns\"><span style=\"color:#FFFFFF;\">How to create your own theater</span></a>")
docsText.setAlignment(Qt.AlignCenter)
docsText.setOpenExternalLinks(True)
# Register fields # Register fields
self.registerField('timePeriod', timePeriodSelect) self.registerField('timePeriod', timePeriodSelect)
@ -321,11 +333,12 @@ class TheaterConfiguration(QtWidgets.QWizardPage):
layout = QtWidgets.QGridLayout() layout = QtWidgets.QGridLayout()
layout.setColumnMinimumWidth(0, 20) layout.setColumnMinimumWidth(0, 20)
layout.addWidget(campaignList, 0, 0, 4, 1) layout.addWidget(campaignList, 0, 0, 5, 1)
layout.addWidget(docsText, 5, 0, 1, 1)
layout.addWidget(self.campaignMapDescription, 0, 1, 1, 1) layout.addWidget(self.campaignMapDescription, 0, 1, 1, 1)
layout.addWidget(self.performanceText, 1, 1, 1, 1) layout.addWidget(self.performanceText, 1, 1, 1, 1)
layout.addWidget(mapSettingsGroup, 2, 1, 1, 1) layout.addWidget(mapSettingsGroup, 2, 1, 1, 1)
layout.addWidget(timeGroup, 3, 1, 1, 1) layout.addWidget(timeGroup, 3, 1, 3, 1)
self.setLayout(layout) self.setLayout(layout)