mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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)
|
[](https://patreon.com/khopa)
|
||||||
|
|
||||||
|
|||||||
@ -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()
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -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 = QAction("Show &logs", self)
|
||||||
self.openLogsAction.triggered.connect(self.showLogsDialog)
|
self.openLogsAction.triggered.connect(self.showLogsDialog)
|
||||||
|
|
||||||
@ -209,6 +215,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)
|
||||||
@ -235,6 +242,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(
|
||||||
|
|||||||
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