diff --git a/changelog.md b/changelog.md index 27449508..195236cd 100644 --- a/changelog.md +++ b/changelog.md @@ -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]** 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]** 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 Poland 2010 faction. * **[Factions]** Added Greece 2005 faction. diff --git a/qt_ui/windows/mission/flight/payload/QFlightPayloadTab.py b/qt_ui/windows/mission/flight/payload/QFlightPayloadTab.py index c6c3b66a..9ad63330 100644 --- a/qt_ui/windows/mission/flight/payload/QFlightPayloadTab.py +++ b/qt_ui/windows/mission/flight/payload/QFlightPayloadTab.py @@ -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 gen.flights.flight import Flight @@ -15,5 +16,13 @@ class QFlightPayloadTab(QFrame): def init_ui(self): layout = QGridLayout() + + # Docs Link + docsText = QLabel("How to create your own default loadout") + docsText.setAlignment(Qt.AlignCenter) + docsText.setOpenExternalLinks(True) + layout.addWidget(self.payload_editor) + layout.addWidget(docsText) + self.setLayout(layout) diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 6cc69fe9..4d7bb5cb 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -5,7 +5,7 @@ from typing import List, Optional from PySide2 import QtGui, QtWidgets 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 game import db @@ -178,10 +178,16 @@ class FactionSelection(QtWidgets.QWizardPage): # Create required mod layout self.requiredModsGroup = QtWidgets.QGroupBox("Required Mods") self.requiredModsGroupLayout = QtWidgets.QHBoxLayout() - self.requiredMods = QtWidgets.QLabel("") + self.requiredMods = QtWidgets.QLabel("") + self.requiredMods.setOpenExternalLinks(True) self.requiredModsGroupLayout.addWidget(self.requiredMods) self.requiredModsGroup.setLayout(self.requiredModsGroupLayout) + # Docs Link + docsText = QtWidgets.QLabel("How to create your own faction") + docsText.setAlignment(Qt.AlignCenter) + docsText.setOpenExternalLinks(True) + # Link form fields self.registerField('blueFaction', self.blueFactionSelect) self.registerField('redFaction', self.redFactionSelect) @@ -190,6 +196,7 @@ class FactionSelection(QtWidgets.QWizardPage): layout = QtWidgets.QVBoxLayout() layout.addWidget(self.factionsGroup) layout.addWidget(self.requiredModsGroup) + layout.addWidget(docsText) self.setLayout(layout) self.updateUnitRecap() @@ -311,6 +318,11 @@ class TheaterConfiguration(QtWidgets.QWizardPage): timePeriod.setBuddy(timePeriodSelect) timePeriodSelect.setCurrentIndex(21) + # Docs Link + docsText = QtWidgets.QLabel("How to create your own theater") + docsText.setAlignment(Qt.AlignCenter) + docsText.setOpenExternalLinks(True) + # Register fields self.registerField('timePeriod', timePeriodSelect) @@ -321,11 +333,12 @@ class TheaterConfiguration(QtWidgets.QWizardPage): layout = QtWidgets.QGridLayout() 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.performanceText, 1, 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)