1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-25 17:14:20 +00:00
swear-jar/interface/score_button.gd

12 lines
209 B
GDScript3
Raw Normal View History

2023-10-01 23:36:23 +00:00
extends Button
class_name ScoreButton
2023-10-03 23:01:36 +00:00
var score: int = 0
2023-10-01 23:36:23 +00:00
func set_score(total: int):
2023-10-03 23:01:36 +00:00
score = total
2023-10-02 16:50:06 +00:00
if total >= 1000:
add_theme_font_size_override("font_size", 8)
2023-10-01 23:36:23 +00:00
text = "$%0.2f" % (float(total) / 100)