Add saving/loading, update tutorial to include removal, add LABEL gate, draw ui over sprites and only activate camera for sprites, use rounded buttons in tools box

This commit is contained in:
csd4ni3l
2025-10-18 22:31:01 +02:00
parent 37a481aeab
commit be262bf253
5 changed files with 166 additions and 37 deletions

5
run.py
View File

@@ -5,7 +5,7 @@ pyglet.options.debug_gl = False
import logging, datetime, os, json, sys, arcade
from utils.utils import get_closest_resolution, print_debug_info, on_exception
from utils.constants import log_dir, menu_background_color
from utils.constants import log_dir, save_dir, menu_background_color
from menus.main import Main
sys.excepthook = on_exception
@@ -16,6 +16,9 @@ pyglet.font.add_directory('./assets/fonts')
if not log_dir in os.listdir():
os.makedirs(log_dir)
if not save_dir in os.listdir():
os.makedirs(save_dir)
while len(os.listdir(log_dir)) >= 5:
files = [(file, os.path.getctime(os.path.join(log_dir, file))) for file in os.listdir(log_dir)]
oldest_file = sorted(files, key=lambda x: x[1])[0][0]