diff options
Diffstat (limited to 'client/gui/menus')
| -rw-r--r-- | client/gui/menus/rating/rating.gd | 8 | ||||
| -rw-r--r-- | client/gui/menus/scoreboard.gd | 14 |
2 files changed, 14 insertions, 8 deletions
diff --git a/client/gui/menus/rating/rating.gd b/client/gui/menus/rating/rating.gd index 023c1333..5bae0268 100644 --- a/client/gui/menus/rating/rating.gd +++ b/client/gui/menus/rating/rating.gd @@ -35,10 +35,10 @@ func _process(_delta): func show_rating(stars_: int, points: int): match stars_: - 0: title.text = tr("c.score.poor") - 1: title.text = tr("c.score.acceptable") - 2: title.text = tr("c.score.good") - 3: title.text = tr("c.score.excellent") + 0: title.text = tr("c.score.stars.poor") + 1: title.text = tr("c.score.stars.acceptable") + 2: title.text = tr("c.score.stars.good") + 3: title.text = tr("c.score.stars.excellent") subtitle.text = tr("c.score.points_par").format([points]) diff --git a/client/gui/menus/scoreboard.gd b/client/gui/menus/scoreboard.gd index c04a3201..067736e0 100644 --- a/client/gui/menus/scoreboard.gd +++ b/client/gui/menus/scoreboard.gd @@ -27,16 +27,22 @@ func _ready() -> void: title.text = tr("c.menu.scoreboard.title").format([data.map]) play_count.text = tr("c.menu.scoreboard.finish_count").format([int(data.plays)]) for entry in data.best: - push_label("%d." % i) - push_label("%d" % entry.score.points) - push_label(", ".join(entry.players)) + var tt = "" + for key in entry.score: + tt += "%s: %d\n" % [tr("c.score.%s" % key), entry.score[key]] + print(tt) + push_label("%d." % i, tt) + push_label("%d" % entry.score.points, tt) + push_label(", ".join(entry.players), tt) i += 1 -func push_label(text: String): +func push_label(text: String, tooltip: String): var label = Label.new() label.add_theme_font_size_override("font_size", 21) label.add_theme_font_override("font", font) + label.mouse_filter = Control.MOUSE_FILTER_STOP label.text = text + label.tooltip_text = tooltip table.add_child(label) func _on_back_pressed() -> void: |