mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
🇺🇦 Support for Ukraine
This commit is contained in:
parent
64b01c471b
commit
510dcd762f
@ -1,4 +1,4 @@
|
||||

|
||||
[](https://shdwp.github.io/ukraine/)
|
||||
|
||||
[](https://patreon.com/khopa)
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import argparse
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
@ -91,6 +92,9 @@ def run_ui(game: Optional[Game], new_map: bool) -> None:
|
||||
splash = QSplashScreen(pixmap)
|
||||
splash.show()
|
||||
|
||||
# Give enough time to read splash screen
|
||||
time.sleep(3)
|
||||
|
||||
# Once splash screen is up : load resources & setup stuff
|
||||
uiconstants.load_icons()
|
||||
uiconstants.load_event_icons()
|
||||
|
||||
@ -34,6 +34,7 @@ def load_icons():
|
||||
ICONS["Github"] = QPixmap(
|
||||
"./resources/ui/misc/" + get_theme_icons() + "/github.png"
|
||||
)
|
||||
ICONS["Ukraine"] = QPixmap("./resources/ui/misc/ukraine.png")
|
||||
|
||||
ICONS["Control Points"] = QPixmap(
|
||||
"./resources/ui/misc/" + get_theme_icons() + "/circle.png"
|
||||
|
||||
@ -169,6 +169,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.triggered.connect(self.showLogsDialog)
|
||||
|
||||
@ -209,6 +215,7 @@ class QLiberationWindow(QMainWindow):
|
||||
self.links_bar = self.addToolBar("Links")
|
||||
self.links_bar.addAction(self.openDiscordAction)
|
||||
self.links_bar.addAction(self.openGithubAction)
|
||||
self.links_bar.addAction(self.ukraineAction)
|
||||
|
||||
self.actions_bar = self.addToolBar("Actions")
|
||||
self.actions_bar.addAction(self.openSettingsAction)
|
||||
@ -235,6 +242,7 @@ class QLiberationWindow(QMainWindow):
|
||||
help_menu = self.menu.addMenu("&Help")
|
||||
help_menu.addAction(self.openDiscordAction)
|
||||
help_menu.addAction(self.openGithubAction)
|
||||
help_menu.addAction(self.ukraineAction)
|
||||
help_menu.addAction(
|
||||
"&Releases",
|
||||
lambda: webbrowser.open_new_tab(
|
||||
|
||||
BIN
resources/ui/misc/ukraine.png
Normal file
BIN
resources/ui/misc/ukraine.png
Normal file
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 |
Loading…
x
Reference in New Issue
Block a user