Merge pull request #2040 from dcs-liberation/ukraine

🇺🇦 Support for Ukraine
This commit is contained in:
C. Perreau
2022-03-03 23:48:11 +01:00
committed by GitHub
6 changed files with 18 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
![Logo](https://i.imgur.com/c2k18E1.png) [![Logo](https://i.imgur.com/HJBT4BL.png)](https://shdwp.github.io/ukraine/)
(Github Readme Banner and Splash screen Artwork by Andriy Dankovych, CC BY-SA 4.0)
[![Patreon](https://img.shields.io/badge/patreon-become%20a%20patron-orange?logo=patreon)](https://patreon.com/khopa) [![Patreon](https://img.shields.io/badge/patreon-become%20a%20patron-orange?logo=patreon)](https://patreon.com/khopa)

View File

@@ -2,6 +2,7 @@ import argparse
import logging import logging
import os import os
import sys import sys
import time
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
@@ -91,6 +92,9 @@ def run_ui(game: Optional[Game], new_map: bool) -> None:
splash = QSplashScreen(pixmap) splash = QSplashScreen(pixmap)
splash.show() splash.show()
# Give enough time to read splash screen
time.sleep(3)
# Once splash screen is up : load resources & setup stuff # Once splash screen is up : load resources & setup stuff
uiconstants.load_icons() uiconstants.load_icons()
uiconstants.load_event_icons() uiconstants.load_event_icons()

View File

@@ -34,6 +34,7 @@ def load_icons():
ICONS["Github"] = QPixmap( ICONS["Github"] = QPixmap(
"./resources/ui/misc/" + get_theme_icons() + "/github.png" "./resources/ui/misc/" + get_theme_icons() + "/github.png"
) )
ICONS["Ukraine"] = QPixmap("./resources/ui/misc/ukraine.png")
ICONS["Control Points"] = QPixmap( ICONS["Control Points"] = QPixmap(
"./resources/ui/misc/" + get_theme_icons() + "/circle.png" "./resources/ui/misc/" + get_theme_icons() + "/circle.png"

View File

@@ -179,6 +179,12 @@ class QLiberationWindow(QMainWindow):
) )
) )
self.ukraineAction = QAction("&Ukraine", self)
self.ukraineAction.setIcon(CONST.ICONS["Ukraine"])
self.ukraineAction.triggered.connect(
lambda: webbrowser.open_new_tab("https://shdwp.github.io/ukraine/")
)
self.openLogsAction = QAction("Show &logs", self) self.openLogsAction = QAction("Show &logs", self)
self.openLogsAction.triggered.connect(self.showLogsDialog) self.openLogsAction.triggered.connect(self.showLogsDialog)
@@ -219,6 +225,7 @@ class QLiberationWindow(QMainWindow):
self.links_bar = self.addToolBar("Links") self.links_bar = self.addToolBar("Links")
self.links_bar.addAction(self.openDiscordAction) self.links_bar.addAction(self.openDiscordAction)
self.links_bar.addAction(self.openGithubAction) self.links_bar.addAction(self.openGithubAction)
self.links_bar.addAction(self.ukraineAction)
self.actions_bar = self.addToolBar("Actions") self.actions_bar = self.addToolBar("Actions")
self.actions_bar.addAction(self.openSettingsAction) self.actions_bar.addAction(self.openSettingsAction)
@@ -245,6 +252,7 @@ class QLiberationWindow(QMainWindow):
help_menu = self.menu.addMenu("&Help") help_menu = self.menu.addMenu("&Help")
help_menu.addAction(self.openDiscordAction) help_menu.addAction(self.openDiscordAction)
help_menu.addAction(self.openGithubAction) help_menu.addAction(self.openGithubAction)
help_menu.addAction(self.ukraineAction)
help_menu.addAction( help_menu.addAction(
"&Releases", "&Releases",
lambda: webbrowser.open_new_tab( lambda: webbrowser.open_new_tab(
@@ -391,6 +399,8 @@ class QLiberationWindow(QMainWindow):
"<b>Ciribob </b> <i>for the JTACAutoLase.lua script</i><br/>" "<b>Ciribob </b> <i>for the JTACAutoLase.lua script</i><br/>"
"<b>Walder </b> <i>for the Skynet-IADS script</i><br/>" "<b>Walder </b> <i>for the Skynet-IADS script</i><br/>"
"<b>Anubis Yinepu </b> <i>for the Hercules Cargo script</i><br/>" "<b>Anubis Yinepu </b> <i>for the Hercules Cargo script</i><br/>"
+ "<h4>Splash Screen :</h4>"
+ "Artwork by Andriy Dankovych (CC BY-SA) [https://www.facebook.com/AndriyDankovych]"
) )
about = QMessageBox() about = QMessageBox()
about.setWindowTitle("About DCS Liberation") about.setWindowTitle("About DCS Liberation")

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 585 KiB