feature/update-main-ui (#66)
Co-authored-by: stilobique-i7 <aurelienvlt@free.fr> Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com> Reviewed-on: Athena/game-source#66 Co-authored-by: darknight <vaillant.jeremy@dev-crea.com> Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
This commit is contained in:
@@ -19,13 +19,13 @@ func _apply_settings_language():
|
||||
data.add_item("English", load("res://assets/ui/flags/english.png"), true) # id : 0
|
||||
data.add_item("Français", load("res://assets/ui/flags/french.png"), true) # id : 1
|
||||
|
||||
data.select(Global.get_setting_language())
|
||||
data.select(Setting.get_setting_language())
|
||||
|
||||
func _apply_settings_gyroscope():
|
||||
$VBoxContainer/gyroscope/HBoxContainer/data.set_pressed(Global.get_setting_gyrosocpe())
|
||||
$VBoxContainer/gyroscope/HBoxContainer/data.set_pressed(Setting.get_setting_gyrosocpe())
|
||||
|
||||
func _apply_settings_sound_ambient():
|
||||
$VBoxContainer/ambient_sound/HBoxContainer/data.set_pressed(Global.get_setting_ambient_sound())
|
||||
$VBoxContainer/ambient_sound/HBoxContainer/data.set_pressed(Setting.get_setting_ambient_sound())
|
||||
|
||||
func _apply_settings_resolution():
|
||||
var data = $VBoxContainer/resolution/VBoxContainer/data
|
||||
@@ -36,23 +36,23 @@ func _apply_settings_resolution():
|
||||
data.add_item("854 x 576", null, true) # id : 3
|
||||
|
||||
for index in range(4):
|
||||
if data.get_item_text(index).split(' x ') == Global.get_setting_resolution():
|
||||
if data.get_item_text(index).split(' x ') == Setting.get_setting_resolution():
|
||||
data.select(index)
|
||||
|
||||
func _apply_settings_fullscreen():
|
||||
$VBoxContainer/fullscreen/HBoxContainer/data.set_pressed(Global.get_setting_fullscreen())
|
||||
$VBoxContainer/fullscreen/HBoxContainer/data.set_pressed(Setting.get_setting_fullscreen())
|
||||
|
||||
func _on_gyroscope_pressed():
|
||||
Global.set_setting_gyroscope(int($VBoxContainer/gyroscope/HBoxContainer/data.pressed))
|
||||
Setting.set_setting_gyroscope(int($VBoxContainer/gyroscope/HBoxContainer/data.pressed))
|
||||
|
||||
func _on_ambient_sound_pressed():
|
||||
Global.set_setting_ambient_sound(int($VBoxContainer/ambient_sound/HBoxContainer/data.pressed))
|
||||
Setting.set_setting_ambient_sound(int($VBoxContainer/ambient_sound/HBoxContainer/data.pressed))
|
||||
|
||||
func _on_langue_item_selected(index):
|
||||
Global.set_setting_language(index)
|
||||
Setting.set_setting_language(index)
|
||||
|
||||
func _on_resolution_item_selected(index):
|
||||
Global.set_setting_resolution($VBoxContainer/resolution/VBoxContainer/data.get_item_text(index))
|
||||
Setting.set_setting_resolution($VBoxContainer/resolution/VBoxContainer/data.get_item_text(index))
|
||||
|
||||
func _on_fullscreen_item_selected():
|
||||
Global.set_setting_fullscreen(int($VBoxContainer/fullscreen/HBoxContainer/data.pressed))
|
||||
Setting.set_setting_fullscreen(int($VBoxContainer/fullscreen/HBoxContainer/data.pressed))
|
||||
|
||||
Reference in New Issue
Block a user