Update new GUI.
- Add font - first step to update main menu Ui - replace button with a subscene - add props textures - write a new resolution default - actvate HDPI
This commit is contained in:
committed by
Vaillant Jeremy
parent
16f79021ad
commit
2d1081a3f8
+19
-19
@@ -11,29 +11,29 @@ var value_old = Vector2(0, 0)
|
||||
func _ready():
|
||||
_translation()
|
||||
|
||||
# Quit the game
|
||||
func _on_Quit_pressed():
|
||||
get_tree().quit(0)
|
||||
|
||||
# Load scene settings
|
||||
func _on_Settings_pressed():
|
||||
_prepare_change_scene()
|
||||
current_scene = settings.instance()
|
||||
add_child(current_scene)
|
||||
|
||||
# Load scene for select game
|
||||
func _on_New_pressed():
|
||||
_prepare_change_scene()
|
||||
current_scene = scenes.instance()
|
||||
add_child(current_scene)
|
||||
|
||||
## PRIVATE
|
||||
func _translation():
|
||||
$Grid/Menu/Action/Puzzles.text = tr("MAIN_BUTTON_PUZZLES")
|
||||
$Grid/Menu/Action/Settings.text = tr("MAIN_BUTTON_SETTINGS")
|
||||
$Grid/Menu/Action/Quit.text = tr("MAIN_BUTTON_QUIT")
|
||||
$MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonPuzzle.text = tr("MAIN_BUTTON_PUZZLES")
|
||||
$MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryHeader/ButtonSetting.text = tr("MAIN_BUTTON_SETTINGS")
|
||||
$MarginContainer/UI_summary/PanelWood/VBoxContainer/SummaryFooter/ButtonQuit.text = tr("MAIN_BUTTON_QUIT")
|
||||
|
||||
func _prepare_change_scene():
|
||||
if (current_scene != null):
|
||||
remove_child(current_scene)
|
||||
current_scene.call_deferred("free")
|
||||
|
||||
# Load scene for select game
|
||||
func _on_ButtonPuzzle_pressed():
|
||||
_prepare_change_scene()
|
||||
current_scene = scenes.instance()
|
||||
add_child(current_scene)
|
||||
|
||||
# Load scene settings
|
||||
func _on_ButtonSetting_pressed():
|
||||
_prepare_change_scene()
|
||||
current_scene = settings.instance()
|
||||
add_child(current_scene)
|
||||
|
||||
# Quit the game
|
||||
func _on_ButtonQuit_pressed():
|
||||
get_tree().quit(0)
|
||||
|
||||
Reference in New Issue
Block a user