Add basic functionality, inventory(but items dont do anything). No textures or anything yet.

This commit is contained in:
csd4ni3l
2025-10-08 20:54:59 +02:00
parent 37db95e342
commit bca585bc45
6 changed files with 300 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import copy, pypresence, json, os
import copy, pypresence, json
import arcade, arcade.gui

21
menus/shop.py Normal file
View File

@@ -0,0 +1,21 @@
import arcade, arcade.gui
from utils.constants import button_style, SHOP_ITEMS
from utils.preload import button_texture, button_hovered_texture
class Shop(arcade.gui.UIView):
def __init__(self, pypresence_client):
super().__init__()
self.pypresence_client = pypresence_client
self.anchor = self.add_widget(arcade.gui.UIAnchorLayout(size_hint=(1, 1)))
self.grid = self.anchor.add(arcade.gui.UIGridLayout(size_hint=(0.75, 0.75), column_count=4, row_count=999), anchor_x="center", anchor_y="center")
def on_show_view(self):
super().on_show_view()
def on_key_press(self, symbol, modifiers):
if symbol == arcade.key.ESCAPE:
from menus.main import Main
self.window.show_view(Main(self.pypresence_client))