Add demo GIF, Hot Air Baloon, add a way to customize notification timeout, rows and columns, make main menu buttons smaller, fix tetris not updating info label after restart

This commit is contained in:
csd4ni3l
2025-09-21 21:02:48 +02:00
parent 183eca33c5
commit 944b5ab212
13 changed files with 240 additions and 79 deletions

View File

@@ -52,28 +52,31 @@ class Main(arcade.gui.UIView):
self.title_label = self.box.add(arcade.gui.UILabel(text="NotifPlayground", font_name="Roboto", font_size=48))
self.snake_button = self.box.add(arcade.gui.UITextureButton(text="Snake", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.snake_button = self.box.add(arcade.gui.UITextureButton(text="Snake", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.snake_button.on_click = lambda event: self.snake()
self.flappy_bird_button = self.box.add(arcade.gui.UITextureButton(text="Flappy Bird", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.flappy_bird_button = self.box.add(arcade.gui.UITextureButton(text="Flappy Bird", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.flappy_bird_button.on_click = lambda event: self.flappy_bird()
self.pong_button = self.box.add(arcade.gui.UITextureButton(text="Pong", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.pong_button = self.box.add(arcade.gui.UITextureButton(text="Pong", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.pong_button.on_click = lambda event: self.pong()
self.space_invaders_button = self.box.add(arcade.gui.UITextureButton(text="Space Invaders", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.space_invaders_button = self.box.add(arcade.gui.UITextureButton(text="Space Invaders", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.space_invaders_button.on_click = lambda event: self.space_invaders()
self.wps_test_button = self.box.add(arcade.gui.UITextureButton(text="WPS Test", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.wps_test_button = self.box.add(arcade.gui.UITextureButton(text="WPS Test", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.wps_test_button.on_click = lambda event: self.wps_test()
self.maze_button = self.box.add(arcade.gui.UITextureButton(text="Maze", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.maze_button = self.box.add(arcade.gui.UITextureButton(text="Maze", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.maze_button.on_click = lambda event: self.maze()
self.tetris_button = self.box.add(arcade.gui.UITextureButton(text="Tetris", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.tetris_button = self.box.add(arcade.gui.UITextureButton(text="Tetris", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.tetris_button.on_click = lambda event: self.tetris()
self.settings_button = self.box.add(arcade.gui.UITextureButton(text="Settings", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 12, style=big_button_style))
self.hot_air_baloon_button = self.box.add(arcade.gui.UITextureButton(text="Hot Air Baloon", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.hot_air_baloon_button.on_click = lambda event: self.hot_air_baloon()
self.settings_button = self.box.add(arcade.gui.UITextureButton(text="Settings", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=self.window.height / 14, style=big_button_style))
self.settings_button.on_click = lambda event: self.settings()
def pong(self):
@@ -104,6 +107,10 @@ class Main(arcade.gui.UIView):
from game.tetris import Game
self.window.show_view(Game(self.pypresence_client))
def hot_air_baloon(self):
from game.hot_air_baloon import Game
self.window.show_view(Game(self.pypresence_client))
def settings(self):
from menus.settings import Settings
self.window.show_view(Settings(self.pypresence_client))