set up sliders properly, also adjust read speed slider range
This commit is contained in:
parent
0e63f5965f
commit
4790230bcc
11
game.gd
11
game.gd
|
@ -70,16 +70,19 @@ func _on_game_started_set(v):
|
||||||
game_started = v
|
game_started = v
|
||||||
|
|
||||||
func _on_set_reading_speed(s):
|
func _on_set_reading_speed(s):
|
||||||
pass
|
reading_speed = s
|
||||||
|
|
||||||
func _on_set_master_vol(v):
|
func _on_set_master_vol(v):
|
||||||
pass
|
assert(v >= 0 and v <= 100)
|
||||||
|
master_vol = v
|
||||||
|
|
||||||
func _on_set_music_vol(v):
|
func _on_set_music_vol(v):
|
||||||
pass
|
assert(v >= 0 and v <= 100)
|
||||||
|
music_vol = v
|
||||||
|
|
||||||
func _on_set_sfx_vol(v):
|
func _on_set_sfx_vol(v):
|
||||||
pass
|
assert(v >= 0 and v <= 100)
|
||||||
|
sfx_vol = v
|
||||||
|
|
||||||
func _on_game_start():
|
func _on_game_start():
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ onready var back_btn = get_node("back_btn")
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|
||||||
# game opt connections
|
# game opt connections
|
||||||
read_speed_slider.connect("changed", self, "_on_read_speed_changed")
|
read_speed_slider.value = Game.reading_speed
|
||||||
|
read_speed_slider.connect("value_changed", self, "_on_read_speed_changed")
|
||||||
|
|
||||||
# display opt connections
|
# display opt connections
|
||||||
var size_popup = window_size_menu.get_popup()
|
var size_popup = window_size_menu.get_popup()
|
||||||
|
@ -33,15 +34,16 @@ func _ready():
|
||||||
music_slider.value = Game.music_vol
|
music_slider.value = Game.music_vol
|
||||||
sfx_slider.value = Game.sfx_vol
|
sfx_slider.value = Game.sfx_vol
|
||||||
|
|
||||||
master_slider.connect("changed", self, "_on_master_vol_changed")
|
master_slider.connect("value_changed", self, "_on_master_vol_changed")
|
||||||
music_slider.connect("changed", self, "_on_music_vol_changed")
|
music_slider.connect("value_changed", self, "_on_music_vol_changed")
|
||||||
sfx_slider.connect("changed", self, "_on_sfx_vol_changed")
|
sfx_slider.connect("value_changed", self, "_on_sfx_vol_changed")
|
||||||
|
|
||||||
# back to menu
|
# back to menu
|
||||||
back_btn.connect("pressed", self, "_on_back_pressed")
|
back_btn.connect("pressed", self, "_on_back_pressed")
|
||||||
|
|
||||||
func _on_read_speed_changed(v):
|
func _on_read_speed_changed(v):
|
||||||
pass
|
Game.reading_speed = v
|
||||||
|
print(v)
|
||||||
|
|
||||||
func _on_window_size_menu_id_pressed(id):
|
func _on_window_size_menu_id_pressed(id):
|
||||||
pass
|
pass
|
||||||
|
@ -50,13 +52,13 @@ func _on_window_mode_menu_id_pressed(id):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _on_master_vol_changed(v):
|
func _on_master_vol_changed(v):
|
||||||
pass
|
Game.master_vol = v
|
||||||
|
|
||||||
func _on_music_vol_changed(v):
|
func _on_music_vol_changed(v):
|
||||||
pass
|
Game.music_vol = v
|
||||||
|
|
||||||
func _on_sfx_vol_changed(v):
|
func _on_sfx_vol_changed(v):
|
||||||
pass
|
Game.sfx_vol = v
|
||||||
|
|
||||||
func _on_back_pressed():
|
func _on_back_pressed():
|
||||||
Game.switch_scene_to(from_scene_name, false)
|
Game.switch_scene_to(from_scene_name, false)
|
|
@ -244,11 +244,11 @@ mouse_filter = 0
|
||||||
mouse_default_cursor_shape = 0
|
mouse_default_cursor_shape = 0
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
min_value = 0.0
|
min_value = 0.1
|
||||||
max_value = 100.0
|
max_value = 2.0
|
||||||
step = 1.0
|
step = 0.1
|
||||||
page = 0.0
|
page = 0.0
|
||||||
value = 0.0
|
value = 1.0
|
||||||
exp_edit = false
|
exp_edit = false
|
||||||
rounded = false
|
rounded = false
|
||||||
editable = true
|
editable = true
|
||||||
|
|
Loading…
Reference in New Issue