Mods
This commit is contained in:
parent
554cd1af72
commit
c185aaa500
|
@ -56,4 +56,4 @@ class Config:
|
||||||
Config.font_path = Config.here / "fonts" / "NotoSans-Regular.ttf"
|
Config.font_path = Config.here / "fonts" / "NotoSans-Regular.ttf"
|
||||||
Config.emoji_font_path = Config.here / "fonts" / "NotoEmoji-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.song_path = Config.here / "audio" / "March of the Cyber Ants.mp3"
|
||||||
Config.logo_path = Config.here / "img" / "logo_3.jpg"
|
Config.logo_path = Config.here / "img" / "logo_3.jpg"
|
||||||
|
|
|
@ -105,11 +105,10 @@ class Game:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_image(
|
def get_image(
|
||||||
image_path: Path, color: tuple[int, int, int] | None = None,
|
path: Path, color: tuple[int, int, int] | None = None, tooltip: str = ""
|
||||||
tooltip: str = ""
|
|
||||||
) -> QLabel:
|
) -> QLabel:
|
||||||
image_label = QLabel()
|
image_label = QLabel()
|
||||||
pixmap = QPixmap(str(image_path))
|
pixmap = QPixmap(str(path))
|
||||||
|
|
||||||
scaled_pixmap = pixmap.scaled(
|
scaled_pixmap = pixmap.scaled(
|
||||||
Config.image_size,
|
Config.image_size,
|
||||||
|
@ -226,4 +225,4 @@ class Game:
|
||||||
path = str(Config.song_path)
|
path = str(Config.song_path)
|
||||||
Window.play_audio(path)
|
Window.play_audio(path)
|
||||||
|
|
||||||
Game.playing_song = not Game.playing_song
|
Game.playing_song = not Game.playing_song
|
||||||
|
|
|
@ -114,4 +114,4 @@ class Utils:
|
||||||
def to_date(timestamp: float) -> str:
|
def to_date(timestamp: float) -> str:
|
||||||
dt_object = datetime.fromtimestamp(timestamp)
|
dt_object = datetime.fromtimestamp(timestamp)
|
||||||
hour = dt_object.strftime("%I").lstrip("0")
|
hour = dt_object.strftime("%I").lstrip("0")
|
||||||
return dt_object.strftime(f"%b %d %Y - {hour}:%M %p")
|
return dt_object.strftime(f"%b %d %Y - {hour}:%M %p")
|
||||||
|
|
Loading…
Reference in New Issue