#9 #32 #33 : New winner screen, new setting for hide beginning and fixed bug
Build / build (push) Successful in 1m25s
Build / build (push) Successful in 1m25s
This commit is contained in:
@@ -51,6 +51,15 @@ var lower_inspiration_speed_button: Button = %LowerInspirationSpeedButton
|
||||
@onready
|
||||
var increase_inspiration_speed_button: Button = %IncreaseInspirationSpeedButton
|
||||
|
||||
@onready
|
||||
var hide_for_seconds_label: Label = %HideForSecondsLabel
|
||||
|
||||
@onready
|
||||
var lower_hide_for_seconds_button: Button = %LowerHideForSecondsButton
|
||||
|
||||
@onready
|
||||
var increase_hide_for_seconds_button: Button = %IncreaseHideForSecondsButton
|
||||
|
||||
@onready
|
||||
var select_server_button: OptionButton = %SelectServerButton
|
||||
|
||||
@@ -80,6 +89,8 @@ func _ready() -> void:
|
||||
increase_cache_button.pressed.connect(increase_cache)
|
||||
lower_inspiration_speed_button.pressed.connect(lower_inspiration_speed)
|
||||
increase_inspiration_speed_button.pressed.connect(increase_inspiration_speed)
|
||||
lower_hide_for_seconds_button.pressed.connect(lower_hide_for_seconds)
|
||||
increase_hide_for_seconds_button.pressed.connect(increase_hide_for_seconds)
|
||||
fullscreen_button.pressed.connect(fullscreen)
|
||||
local_button.pressed.connect(local_play)
|
||||
|
||||
@@ -93,7 +104,9 @@ func _ready() -> void:
|
||||
score_label.text = str(Settings.winning_score)
|
||||
cache_label.text = str(Playlist.number_of_tracks_to_preload)
|
||||
inspiration_speed_label.text = str(Settings.inspiration_list_speed)
|
||||
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
|
||||
fullscreen_button.button_pressed = Settings.fullscreen
|
||||
update_hide_for_seconds_enabled()
|
||||
select_server_button.select(Settings.selected_server)
|
||||
select_server_button.item_selected.connect(select_server)
|
||||
|
||||
@@ -128,6 +141,11 @@ func low_played() -> void:
|
||||
|
||||
func hide_beginning() -> void:
|
||||
Settings.hide_beginning = !Settings.hide_beginning
|
||||
update_hide_for_seconds_enabled()
|
||||
|
||||
func update_hide_for_seconds_enabled() -> void:
|
||||
var enabled: bool = Settings.hide_beginning
|
||||
%HideForSecondsHBoxContainer.visible = enabled
|
||||
|
||||
func hide_length() -> void:
|
||||
Settings.hide_length = !Settings.hide_length
|
||||
@@ -167,6 +185,18 @@ func increase_inspiration_speed() -> void:
|
||||
Settings.inspiration_list_speed += 1
|
||||
inspiration_speed_label.text = str(Settings.inspiration_list_speed )
|
||||
|
||||
func lower_hide_for_seconds() -> void:
|
||||
Settings.hide_for_seconds -= 1.0
|
||||
if Settings.hide_for_seconds < 0:
|
||||
Settings.hide_for_seconds = 0
|
||||
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
|
||||
|
||||
func increase_hide_for_seconds() -> void:
|
||||
Settings.hide_for_seconds += 1.0
|
||||
if Settings.hide_for_seconds > 10.0:
|
||||
Settings.hide_for_seconds = 10.0
|
||||
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
|
||||
|
||||
func select_server(new_server: int) -> void:
|
||||
print("select_server")
|
||||
Settings.default_path = select_server_button.get_item_text(new_server)
|
||||
|
||||
Reference in New Issue
Block a user