From a37cad09477bd21cebdf63814447721aaddff5f4 Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Wed, 14 May 2025 15:23:26 +0200 Subject: [PATCH] update arcade dependency to development branch, add setting start settings start category constant --- menus/settings.py | 6 ++--- pyproject.toml | 2 +- requirements.txt | 2 +- utils/constants.py | 62 ++++++++++++++++++++++++---------------------- uv.lock | 4 +-- 5 files changed, 39 insertions(+), 37 deletions(-) diff --git a/menus/settings.py b/menus/settings.py index 36fc514..6f7c6be 100644 --- a/menus/settings.py +++ b/menus/settings.py @@ -2,7 +2,7 @@ import copy, pypresence, json, os import arcade, arcade.gui -from utils.constants import button_style, dropdown_style, slider_style, settings, discord_presence_id +from utils.constants import button_style, dropdown_style, slider_style, settings, discord_presence_id, settings_start_category from utils.utils import FakePyPresence from utils.preload import button_texture, button_hovered_texture, theme_sound @@ -25,7 +25,7 @@ class Settings(arcade.gui.UIView): self.on_radiobuttons = {} self.off_radiobuttons = {} - self.current_category = "Graphics" + self.current_category = settings_start_category self.modified_settings = {} @@ -54,7 +54,7 @@ class Settings(arcade.gui.UIView): self.display_categories() - self.display_category("Graphics") + self.display_category(settings_start_category) def display_categories(self): for category in settings: diff --git a/pyproject.toml b/pyproject.toml index a35db97..5c89808 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,4 +7,4 @@ requires-python = ">=3.11" dependencies = ["arcade", "pypresence>=4.3.0"] [tool.uv.sources] -arcade = { git = "https://github.com/pythonarcade/arcade.git", rev = "gui/controller" } +arcade = { git = "https://github.com/pythonarcade/arcade.git", rev = "development" } diff --git a/requirements.txt b/requirements.txt index 261a28a..5f9d423 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ Pillow -git+https://github.com/pythonarcade/arcade.git@gui/controller +git+https://github.com/pythonarcade/arcade.git@development pypresence diff --git a/utils/constants.py b/utils/constants.py index 7e6a164..2609163 100644 --- a/utils/constants.py +++ b/utils/constants.py @@ -6,10 +6,41 @@ from arcade.gui.widgets.slider import UISliderStyle menu_background_color = (30, 30, 47) log_dir = 'logs' discord_presence_id = 1360953272843632680 + CELL_SIZE = 48 ROWS = 14 COLS = 14 OUTLINE_WIDTH = 2 +SHAPES = { + "I": [(0, 0), (1, 0), (2, 0), (3, 0)], + "I_R1": [(0, 0), (0, 1), (0, 2), (0, 3)], + "O": [(0, 0), (1, 0), (0, 1), (1, 1)], + "T": [(0, 0), (1, 0), (2, 0), (1, 1)], + "T_R1": [(1, 0), (1, 1), (1, 2), (0, 1)], + "T_R2": [(0, 1), (1, 1), (2, 1), (1, 0)], + "T_R3": [(0, 0), (0, 1), (0, 2), (1, 1)], + "L": [(0, 0), (0, 1), (0, 2), (1, 2)], + "L_R1": [(0, 1), (1, 1), (2, 1), (2, 0)], + "L_R2": [(1, 0), (1, 1), (1, 2), (0, 0)], + "L_R3": [(0, 0), (1, 0), (2, 0), (0, 1)], + "J": [(1, 0), (1, 1), (1, 2), (0, 2)], + "J_R1": [(0, 0), (0, 1), (1, 1), (2, 1)], + "J_R2": [(0, 0), (1, 0), (0, 1), (0, 2)], + "J_R3": [(0, 0), (1, 0), (2, 0), (2, 1)], + "LINE1": [(0, 0)], + "LINE2": [(0, 0), (1, 0)], + "LINE3": [(0, 0), (1, 0), (2, 0)], +} + +COLORS = { + "red": (255, 90, 90, 255), + "blue": (100, 180, 255, 255), + "green": (100, 255, 160, 255), + "yellow": (255, 230, 100, 255), + "purple": (200, 100, 255, 255), + "orange": (255, 160, 90, 255), + "teal": (100, 255, 255, 255), +} button_style = {'normal': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK), 'hover': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK), 'press': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK), 'disabled': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK)} @@ -41,33 +72,4 @@ settings = { "Credits": {} } -SHAPES = { - "I": [(0, 0), (1, 0), (2, 0), (3, 0)], - "I_R1": [(0, 0), (0, 1), (0, 2), (0, 3)], - "O": [(0, 0), (1, 0), (0, 1), (1, 1)], - "T": [(0, 0), (1, 0), (2, 0), (1, 1)], - "T_R1": [(1, 0), (1, 1), (1, 2), (0, 1)], - "T_R2": [(0, 1), (1, 1), (2, 1), (1, 0)], - "T_R3": [(0, 0), (0, 1), (0, 2), (1, 1)], - "L": [(0, 0), (0, 1), (0, 2), (1, 2)], - "L_R1": [(0, 1), (1, 1), (2, 1), (2, 0)], - "L_R2": [(1, 0), (1, 1), (1, 2), (0, 0)], - "L_R3": [(0, 0), (1, 0), (2, 0), (0, 1)], - "J": [(1, 0), (1, 1), (1, 2), (0, 2)], - "J_R1": [(0, 0), (0, 1), (1, 1), (2, 1)], - "J_R2": [(0, 0), (1, 0), (0, 1), (0, 2)], - "J_R3": [(0, 0), (1, 0), (2, 0), (2, 1)], - "LINE1": [(0, 0)], - "LINE2": [(0, 0), (1, 0)], - "LINE3": [(0, 0), (1, 0), (2, 0)], -} - -COLORS = { - "red": (255, 90, 90, 255), - "blue": (100, 180, 255, 255), - "green": (100, 255, 160, 255), - "yellow": (255, 230, 100, 255), - "purple": (200, 100, 255, 255), - "orange": (255, 160, 90, 255), - "teal": (100, 255, 255, 255), -} +settings_start_category = "Graphics" diff --git a/uv.lock b/uv.lock index 9ed6d86..d9d33e6 100644 --- a/uv.lock +++ b/uv.lock @@ -5,7 +5,7 @@ requires-python = ">=3.11" [[package]] name = "arcade" version = "3.1.0" -source = { git = "https://github.com/pythonarcade/arcade.git?rev=gui%2Fcontroller#2e455be7a75170192a74549517cbdc9bd988780d" } +source = { git = "https://github.com/pythonarcade/arcade.git?rev=development#a17e95502bc0c7cd0527445e62bff84a49183c43" } dependencies = [ { name = "pillow" }, { name = "pyglet" }, @@ -202,7 +202,7 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "arcade", git = "https://github.com/pythonarcade/arcade.git?rev=gui%2Fcontroller" }, + { name = "arcade", git = "https://github.com/pythonarcade/arcade.git?rev=development" }, { name = "pypresence", specifier = ">=4.3.0" }, ]