Add localization support for achievements: implement language-specific titles and update UI components
This commit is contained in:
@@ -2,6 +2,10 @@ extends Node
|
||||
## Player-wide achievement progress and the shared in-game notification queue.
|
||||
const E = preload("res://world/owniverse/math/exact.gd")
|
||||
const ITEM = preload("res://ui/achievements/achievement_item.tscn")
|
||||
const TITLES = {
|
||||
"en": preload("res://ui/achievements/achievements.en.png"),
|
||||
"ru": preload("res://ui/achievements/achievements.ru.png"),
|
||||
}
|
||||
var progress_path: String = "user://achievements.cfg"
|
||||
const HOLD_SECONDS = 3.0
|
||||
const FADE_SECONDS = 0.3
|
||||
@@ -158,6 +162,8 @@ func _display_event(event: Dictionary) -> void:
|
||||
panel.show()
|
||||
|
||||
func _rebuild_list() -> void:
|
||||
var title: TextureRect = stage.get_node_or_null("Achievements/Header/Title")
|
||||
if title != null: title.texture = TITLES[locale]
|
||||
var unlocked := 0
|
||||
var position := 1
|
||||
for id in definitions:
|
||||
|
||||
Reference in New Issue
Block a user