revert judge counter drawing code

This commit is contained in:
Anthony Samms
2025-10-27 09:58:09 -04:00
parent 37599578e5
commit 104ec726b0

View File

@@ -2117,22 +2117,17 @@ class JudgeCounter:
for i in range(4): for i in range(4):
tex.draw_texture('judge_counter', 'percent', index=i, color=self.orange) tex.draw_texture('judge_counter', 'percent', index=i, color=self.orange)
total_notes = self.good + self.ok + self.bad or 1 total_notes = self.good + self.ok + self.bad
inv_total = rounded(100.0 / total_notes) if total_notes == 0:
good_percent = self.good * inv_total total_notes = 1
ok_percent = self.ok * inv_total self.draw_counter(self.good / total_notes * 100, 260, 440, 23, ray.Color(253, 161, 0, 255))
bad_percent = self.bad * inv_total self.draw_counter(self.ok / total_notes * 100, 260, 477, 23, ray.Color(253, 161, 0, 255))
combo_percent = (self.good + self.ok) * inv_total self.draw_counter(self.bad / total_notes * 100, 260, 515, 23, ray.Color(253, 161, 0, 255))
self.draw_counter(good_percent, 260, 440, 23, self.orange) self.draw_counter((self.good + self.ok) / total_notes * 100, 270, 388, 23, ray.Color(253, 161, 0, 255))
self.draw_counter(ok_percent, 260, 477, 23, self.orange) self.draw_counter(self.good, 180, 440, 23, ray.WHITE)
self.draw_counter(bad_percent, 260, 515, 23, self.orange) self.draw_counter(self.ok, 180, 477, 23, ray.WHITE)
self.draw_counter(combo_percent, 270, 388, 23, self.orange) self.draw_counter(self.bad, 180, 515, 23, ray.WHITE)
self.draw_counter(self.drumrolls, 180, 577, 23, ray.WHITE)
self.draw_counter(self.good, 180, 440, 23, self.white)
self.draw_counter(self.ok, 180, 477, 23, self.white)
self.draw_counter(self.bad, 180, 515, 23, self.white)
self.draw_counter(self.drumrolls, 180, 577, 23, self.white)
class Gauge: class Gauge:
"""The player's gauge""" """The player's gauge"""