mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
finish song select
This commit is contained in:
@@ -2,6 +2,7 @@ import hashlib
|
||||
import math
|
||||
from collections import deque
|
||||
from dataclasses import dataclass, field, fields
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from libs.utils import get_pixels_per_frame, strip_comments
|
||||
@@ -63,7 +64,10 @@ class TJAParser:
|
||||
#Defined on startup
|
||||
self.folder_path = Path(path)
|
||||
self.folder_name = self.folder_path.name
|
||||
self.file_path = self.folder_path / f"{self.folder_name}.tja"
|
||||
for _, _, files in os.walk(self.folder_path):
|
||||
for file in files:
|
||||
if file.endswith('tja'):
|
||||
self.file_path = self.folder_path / f'{file}'
|
||||
|
||||
#Defined on file_to_data()
|
||||
self.data = []
|
||||
|
||||
@@ -102,7 +102,6 @@ def draw_scaled_texture(texture: ray.Texture, x: int, y: int, scale: float, colo
|
||||
|
||||
@dataclass
|
||||
class SessionData:
|
||||
selected_song: str = '' #Path
|
||||
selected_difficulty: int = 0
|
||||
song_title: str = ''
|
||||
result_score: int = 0
|
||||
@@ -120,6 +119,7 @@ def reset_session():
|
||||
|
||||
@dataclass
|
||||
class GlobalData:
|
||||
selected_song: str = '' #Path
|
||||
textures: dict[str, list[ray.Texture]] = field(default_factory=lambda: dict())
|
||||
songs_played: int = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user