Add ark-pixel font
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
class_name DebugMenu extends VBoxContainer
|
||||
|
||||
var whatever:String = tr("SOME_STRING_TRANSLATED")
|
||||
|
||||
func _ready() -> void:
|
||||
show()
|
||||
|
||||
@@ -14,12 +12,31 @@ func _ready() -> void:
|
||||
$Cooking.connect("pressed", _on_Cooking_pressed);
|
||||
$Battle.connect("pressed", _on_Battle_pressed);
|
||||
|
||||
$LanguageOption/LangDropdown.item_selected.connect(_on_LanguageSelected)
|
||||
$LanguageOption/RegDropdown.item_selected.connect(_on_RegionSelected)
|
||||
|
||||
# Overworld List
|
||||
var i:int = 0;
|
||||
for map in OVERWORLD.MAPS.keys():
|
||||
$OverworldOption/MapDropdown.add_item(map, i);
|
||||
i = i + 1;
|
||||
|
||||
# Language list
|
||||
i = 0
|
||||
for lang in LOCALE.LANGUAGE_MATCH.keys():
|
||||
$LanguageOption/LangDropdown.add_item(lang, i);
|
||||
if LOCALE.LANGUAGE_MATCH[lang] == LOCALE.language:
|
||||
$LanguageOption/LangDropdown.selected = i
|
||||
i = i + 1;
|
||||
|
||||
# Region list
|
||||
i = 0
|
||||
for reg in LOCALE.REGION_MATCH.keys():
|
||||
$LanguageOption/RegDropdown.add_item(reg, i);
|
||||
if LOCALE.REGION_MATCH[reg] == LOCALE.region:
|
||||
$LanguageOption/RegDropdown.selected = i
|
||||
i = i + 1;
|
||||
|
||||
func _exit_tree() -> void:
|
||||
$MainMenu.disconnect("pressed", _on_MainMenu_pressed);
|
||||
$OverworldOption/Overworld.disconnect("pressed", _on_Overworld_pressed);
|
||||
@@ -55,7 +72,6 @@ func _on_Quests_pressed():
|
||||
|
||||
func _on_Custscene_pressed():
|
||||
print("Cutscene pressed")
|
||||
print(whatever)
|
||||
|
||||
func _on_Cooking_pressed():
|
||||
print("Cooking pressed")
|
||||
@@ -77,6 +93,14 @@ func _on_Inventory_pressed():
|
||||
else:
|
||||
UI.INVENTORY_MENU.open()
|
||||
|
||||
func _on_LanguageSelected(index:int) -> void:
|
||||
var lang:String = $LanguageOption/LangDropdown.get_item_text(index)
|
||||
LOCALE.setLocale(LOCALE.LANGUAGE_MATCH[lang], LOCALE.region)
|
||||
|
||||
func _on_RegionSelected(index:int) -> void:
|
||||
var reg:String = $LanguageOption/RegDropdown.get_item_text(index)
|
||||
LOCALE.setLocale(LOCALE.language, LOCALE.REGION_MATCH[reg])
|
||||
|
||||
func open() -> void:
|
||||
show()
|
||||
|
||||
|
Reference in New Issue
Block a user