diff --git a/cromulant/config.py b/cromulant/config.py index f882557..9e18588 100644 --- a/cromulant/config.py +++ b/cromulant/config.py @@ -8,7 +8,7 @@ import appdirs # type: ignore class Config: title: str = "Cromulant" width: int = 900 - height: int = 800 + height: int = 900 max_ants: int = 100 here: Path ants_json: Path @@ -37,6 +37,7 @@ class Config: triumph_message: str = "Scored a triumph" hit_message: str = "Took a hit" song_path: Path + logo_path: Path @staticmethod def prepare() -> None: @@ -55,3 +56,4 @@ class Config: Config.font_path = Config.here / "fonts" / "NotoSans-Regular.ttf" Config.emoji_font_path = Config.here / "fonts" / "NotoEmoji-Regular.ttf" Config.song_path = Config.here / "audio" / "March of the Cyber Ants.mp3" + Config.logo_path = Config.here / "img" / "logo_3.jpg" diff --git a/cromulant/game.py b/cromulant/game.py index 2f46b2e..119ba3d 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -221,4 +221,4 @@ class Game: path = str(Config.song_path) Window.play_audio(path) - Game.playing_song = not Game.playing_song + Game.playing_song = not Game.playing_song \ No newline at end of file diff --git a/cromulant/img/logo_1.jpg b/cromulant/img/logo_1.jpg new file mode 100644 index 0000000..3ad23c2 Binary files /dev/null and b/cromulant/img/logo_1.jpg differ diff --git a/cromulant/img/logo_2.jpg b/cromulant/img/logo_2.jpg new file mode 100644 index 0000000..ecb5e4a Binary files /dev/null and b/cromulant/img/logo_2.jpg differ diff --git a/cromulant/img/logo_3.jpg b/cromulant/img/logo_3.jpg new file mode 100644 index 0000000..53ffd1e Binary files /dev/null and b/cromulant/img/logo_3.jpg differ diff --git a/cromulant/img/logo_4.jpg b/cromulant/img/logo_4.jpg new file mode 100644 index 0000000..2d6ac2f Binary files /dev/null and b/cromulant/img/logo_4.jpg differ diff --git a/cromulant/window.py b/cromulant/window.py index d6dbc15..65b5d21 100644 --- a/cromulant/window.py +++ b/cromulant/window.py @@ -82,12 +82,12 @@ class Window: Window.emoji_font = QFontDatabase.applicationFontFamilies(emoji_font_id)[0] style = f""" - QWidget {{ - background-color: {Config.background_color}; - color: {Config.text_color}; - font-size: {Config.font_size}px; - }} - """.strip() + QWidget {{ + background-color: {Config.background_color}; + color: {Config.text_color}; + font-size: {Config.font_size}px; + }} + """.strip() Window.app.setFont(Window.font) Window.root.setContentsMargins(0, 0, 0, 0) @@ -139,6 +139,19 @@ class Window: Window.scroll_area = QScrollArea() Window.scroll_area.setWidgetResizable(True) + # image_path = str(Config.logo_path) + # image_url = QUrl.fromLocalFile(image_path).toString() + + # style = f""" + # QWidget {{ + # background-image: url({image_url}); + # background-repeat: no-repeat; + # background-position: center; + # }} + # """ + + # Window.scroll_area.setStyleSheet(style) + container = QWidget() parent = QVBoxLayout(container) Window.view = QVBoxLayout()