🇺🇦 Support for Ukraine

This commit is contained in:
Khopa 2022-03-02 17:52:47 +01:00
parent 64b01c471b
commit 510dcd762f
6 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
![Logo](https://i.imgur.com/c2k18E1.png) [![Logo](https://i.imgur.com/HJBT4BL.png)](https://shdwp.github.io/ukraine/)
[![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

@ -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(

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