Fix word ambient -> ambient

This commit is contained in:
VAILLANT Jeremy
2021-05-23 21:33:44 +02:00
parent 8ec7569982
commit 1ab1210881
4 changed files with 22 additions and 22 deletions
+7 -7
View File
@@ -2,7 +2,7 @@ extends "res://db/MBase.gd"
var m_langue = { "id": null, "value": null } var m_langue = { "id": null, "value": null }
var m_gyroscope = { "id": null, "value": null } var m_gyroscope = { "id": null, "value": null }
var m_ambiant_sound = { "id": null, "value": null } var m_ambient_sound = { "id": null, "value": null }
const ROW = 0 const ROW = 0
@@ -12,7 +12,7 @@ func _init():
m_langue = _get_data_info(datas, 0) m_langue = _get_data_info(datas, 0)
m_gyroscope = _get_data_info(datas, 1) m_gyroscope = _get_data_info(datas, 1)
m_ambiant_sound = _get_data_info(datas, 2) m_ambient_sound = _get_data_info(datas, 2)
func _get_data_info(datas, id): func _get_data_info(datas, id):
return { return {
@@ -26,8 +26,8 @@ func get_langue():
func get_gyroscope(): func get_gyroscope():
return int(m_gyroscope["value"]) as bool return int(m_gyroscope["value"]) as bool
func get_ambiant_sound(): func get_ambient_sound():
return int(m_ambiant_sound["value"]) as bool return int(m_ambient_sound["value"]) as bool
func set_langue(value): func set_langue(value):
m_langue["value"] = _set_data(value, m_langue["id"], gddb_types.e_prop_type_string) m_langue["value"] = _set_data(value, m_langue["id"], gddb_types.e_prop_type_string)
@@ -39,7 +39,7 @@ func set_gyroscope(value):
return get_gyroscope() return get_gyroscope()
func set_ambiant_sound(value): func set_ambient_sound(value):
m_ambiant_sound["value"] = _set_data(value, m_ambiant_sound["id"], gddb_types.e_prop_type_bool) m_ambient_sound["value"] = _set_data(value, m_ambient_sound["id"], gddb_types.e_prop_type_bool)
return get_ambiant_sound() return get_ambient_sound()
+4 -4
View File
@@ -45,11 +45,11 @@ func get_setting_gyrosocpe():
func set_setting_gyroscope(value): func set_setting_gyroscope(value):
setting.set_gyroscope(value) setting.set_gyroscope(value)
func get_setting_ambiant_sound(): func get_setting_ambient_sound():
return setting.get_ambiant_sound() return setting.get_ambient_sound()
func set_setting_ambiant_sound(value): func set_setting_ambient_sound(value):
setting.set_ambiant_sound(value) setting.set_ambient_sound(value)
func _process(_delta): func _process(_delta):
print("[global#_process]") print("[global#_process]")
+6 -6
View File
@@ -5,7 +5,7 @@ func _ready():
_translation() _translation()
_apply_settings_language() _apply_settings_language()
_apply_settings_gyroscope() _apply_settings_gyroscope()
_apply_settings_sound_ambiant() _apply_settings_sound_ambient()
## PRIVATE ## PRIVATE
func _translation(): func _translation():
@@ -18,13 +18,13 @@ func _apply_settings_language():
func _apply_settings_gyroscope(): func _apply_settings_gyroscope():
$VBoxContainer/gyroscope/HBoxContainer/data.set_pressed(Global.get_setting_gyrosocpe()) $VBoxContainer/gyroscope/HBoxContainer/data.set_pressed(Global.get_setting_gyrosocpe())
func _apply_settings_sound_ambiant(): func _apply_settings_sound_ambient():
$VBoxContainer/ambiant_sound/HBoxContainer/data.set_pressed(Global.get_setting_ambiant_sound()) $VBoxContainer/ambient_sound/HBoxContainer/data.set_pressed(Global.get_setting_ambient_sound())
func _on_gyroscope_pressed(): func _on_gyroscope_pressed():
print("[Settings#_on_gyroscope_pressed] change value to database ...........") print("[Settings#_on_gyroscope_pressed] change value to database ...........")
Global.set_setting_gyroscope(int($VBoxContainer/gyroscope/HBoxContainer/data.pressed)) Global.set_setting_gyroscope(int($VBoxContainer/gyroscope/HBoxContainer/data.pressed))
func _on_ambiant_sound_pressed(): func _on_ambient_sound_pressed():
print("[Settings#_on_ambiant_sound_pressed] change value to database ...........") print("[Settings#_on_ambient_sound_pressed] change value to database ...........")
Global.set_setting_ambiant_sound(int($VBoxContainer/ambiant_sound/HBoxContainer/data.pressed)) Global.set_setting_ambient_sound(int($VBoxContainer/ambient_sound/HBoxContainer/data.pressed))
+5 -5
View File
@@ -8,7 +8,7 @@ onready var last_btn = null
func _ready(): func _ready():
_display_hud_menu() _display_hud_menu()
_play_ambiant_sound() _play_ambient_sound()
func _display_hud_menu(): func _display_hud_menu():
var counter = 0 var counter = 0
@@ -46,7 +46,7 @@ func _create_button_info(scene, counter, label_id):
last_btn = btn last_btn = btn
func _play_ambiant_sound(): func _play_ambient_sound():
if Global.get_setting_ambiant_sound(): if Global.get_setting_ambient_sound():
$AmbiantSound.play() $AmbientSound.play()
$AmbiantSound.stream_paused = false $AmbientSound.stream_paused = false