wip: arcaea-offline==0.2.0

This commit is contained in:
2023-09-01 04:01:14 +08:00
parent a9d2b5f75d
commit ecd4ed619e
8 changed files with 40 additions and 30 deletions

View File

@ -98,7 +98,7 @@ class ChartDelegate(TextSegmentDelegate):
],
[
{
self.TextRole: f"{rating_class_to_text(chart.rating_class)} {chart.rating / 10:.1f}",
self.TextRole: f"{rating_class_to_text(chart.rating_class)} {chart.constant / 10:.1f}",
self.ColorRole: self.RatingClassColors[chart.rating_class],
},
],

View File

@ -95,7 +95,7 @@ class ScoreDelegate(TextSegmentDelegate):
chart = self.getChart(index)
if isinstance(score, Score) and isinstance(chart, Chart):
scoreRange = calculate_score_range(chart.note, score.pure, score.far)
scoreRange = calculate_score_range(chart.notes, score.pure, score.far)
return scoreRange[0] <= score.score <= scoreRange[1]
def getScoreGradeGradientWrapper(self, score: int):
@ -203,7 +203,7 @@ class ScoreDelegate(TextSegmentDelegate):
editor.setWindowFlag(Qt.WindowType.Sheet, True)
editor.setWindowFlag(Qt.WindowType.FramelessWindowHint, True)
editor.setWindowTitle(
f"{chart.name_en}({chart.song_id}) | {rating_class_to_text(chart.rating_class)} | {chart.package_id}"
f"{chart.title}({chart.song_id}) | {rating_class_to_text(chart.rating_class)} | {chart.set}"
)
editor.setText(self.getScore(index))
editor.setValidateBeforeAccept(False)