mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
add dan result screen
This commit is contained in:
@@ -90,6 +90,65 @@ class Modifiers:
|
||||
inverse: bool = False
|
||||
random: int = 0
|
||||
|
||||
@dataclass
|
||||
class DanResultSong:
|
||||
"""
|
||||
Data class for storing dan result song data.
|
||||
"""
|
||||
selected_difficulty: int = 0
|
||||
diff_level: int = 0
|
||||
song_title: str = "default_title"
|
||||
genre_index: int = 0
|
||||
good: int = 0
|
||||
ok: int = 0
|
||||
bad: int = 0
|
||||
drumroll: int = 0
|
||||
|
||||
class DanResultExam:
|
||||
"""
|
||||
Data class for storing dan result exam data.
|
||||
"""
|
||||
progress: float = 0
|
||||
counter_value: int = 0
|
||||
bar_texture: str = "exam_red"
|
||||
failed: bool = False
|
||||
|
||||
@dataclass
|
||||
class DanResultData:
|
||||
"""
|
||||
Data class for storing dan result data.
|
||||
"""
|
||||
dan_color: int = 0
|
||||
dan_title: str = "default_title"
|
||||
score: int = 0
|
||||
gauge_length: float = 0.0
|
||||
max_combo: int = 0
|
||||
songs: list[DanResultSong] = field(default_factory=list)
|
||||
exams: list[Any] = field(default_factory=list)
|
||||
exam_data: list[DanResultExam] = field(default_factory=list)
|
||||
|
||||
@dataclass
|
||||
class ResultData:
|
||||
"""
|
||||
Data class for storing result data.
|
||||
result_score: The score achieved in the game.
|
||||
result_good: The number of good notes achieved in the game.
|
||||
result_ok: The number of ok notes achieved in the game.
|
||||
result_bad: The number of bad notes achieved in the game.
|
||||
result_max_combo: The maximum combo achieved in the game.
|
||||
result_total_drumroll: The total drumroll achieved in the game.
|
||||
result_gauge_length: The length of the gauge achieved in the game.
|
||||
prev_score: The previous score pulled from the database.
|
||||
"""
|
||||
score: int = 0
|
||||
good: int = 0
|
||||
ok: int = 0
|
||||
bad: int = 0
|
||||
max_combo: int = 0
|
||||
total_drumroll: int = 0
|
||||
gauge_length: float = 0
|
||||
prev_score: int = 0
|
||||
|
||||
@dataclass
|
||||
class SessionData:
|
||||
"""Data class for storing session data. Wiped after the result screen.
|
||||
@@ -99,30 +158,16 @@ class SessionData:
|
||||
dan_color: int: The emblem color of the selected dan
|
||||
selected_difficulty: The difficulty level selected by the user.
|
||||
song_title: The title of the song being played.
|
||||
genre_index: The index of the genre being played.
|
||||
result_score: The score achieved in the game.
|
||||
result_good: The number of good notes achieved in the game.
|
||||
result_ok: The number of ok notes achieved in the game.
|
||||
result_bad: The number of bad notes achieved in the game.
|
||||
result_max_combo: The maximum combo achieved in the game.
|
||||
result_total_drumroll: The total drumroll achieved in the game.
|
||||
result_gauge_length: The length of the gauge achieved in the game.
|
||||
prev_score: The previous score pulled from the database."""
|
||||
genre_index: The index of the genre being played."""
|
||||
selected_song: Path = Path()
|
||||
selected_dan: list[tuple[Any, int, int]] = field(default_factory=lambda: [])
|
||||
selected_dan: list[tuple[Any, int, int, int]] = field(default_factory=lambda: [])
|
||||
selected_dan_exam: list[Any] = field(default_factory=lambda: [])
|
||||
dan_color: int = 0
|
||||
selected_difficulty: int = 0
|
||||
song_title: str = ''
|
||||
song_title: str = "default_title"
|
||||
genre_index: int = 0
|
||||
result_score: int = 0
|
||||
result_good: int = 0
|
||||
result_ok: int = 0
|
||||
result_bad: int = 0
|
||||
result_max_combo: int = 0
|
||||
result_total_drumroll: int = 0
|
||||
result_gauge_length: float = 0
|
||||
prev_score: int = 0
|
||||
result_data: ResultData = field(default_factory=lambda: ResultData())
|
||||
dan_result_data: DanResultData = field(default_factory=lambda: DanResultData())
|
||||
|
||||
@dataclass
|
||||
class GlobalData:
|
||||
|
||||
Reference in New Issue
Block a user