diff options
author | nokoe <nokoe@mailbox.org> | 2024-10-15 00:04:10 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-10-15 00:04:10 +0200 |
commit | 5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de (patch) | |
tree | a9337a73aed994cba852ba65874df03a6b13637e /client/global.gd | |
parent | 55851861d13df210d4c51c932e055e9248b5336c (diff) | |
download | hurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar hurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar.bz2 hurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar.zst |
replace old book textures with ui book
Diffstat (limited to 'client/global.gd')
-rw-r--r-- | client/global.gd | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd index b6fb8b8a..f16aa52e 100644 --- a/client/global.gd +++ b/client/global.gd @@ -217,6 +217,11 @@ func find_menu(node: Node) -> Menu: if node is Menu: return node else: return find_menu(node.get_parent()) +func get_message_str(m: Dictionary) -> String: + if "text" in m: return m.text + if "translation" in m: return tr(m.translation.id).format(m.translation.params.map(get_message_str)) + return "[unsupported message type]" + func language_list(): var a = TranslationServer.get_loaded_locales() a.sort() |