#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:
+8
-19
@@ -67,6 +67,9 @@ var shortcuts_window: Control = %ShortcutsWindow
|
||||
@onready
|
||||
var qr_window: Control = %QRWindow
|
||||
|
||||
@onready
|
||||
var winner_window: Control = %WinnerWindow
|
||||
|
||||
@onready
|
||||
var qr_button: Button = $QRButton
|
||||
|
||||
@@ -115,15 +118,6 @@ var search_button: Button = $SearchButton
|
||||
@onready
|
||||
var search_view: Control= $Search
|
||||
|
||||
@onready
|
||||
var winner_popup: PopupPanel = $WinnerPopupPanel
|
||||
|
||||
@onready
|
||||
var winner_label: Label = %WinnerLabel
|
||||
|
||||
@onready
|
||||
var winner_picture: TextureRect = %WinnerPicture
|
||||
|
||||
@onready
|
||||
var auto_repeat_song_button: CheckButton = $RepeatSongCheckButton
|
||||
|
||||
@@ -131,7 +125,7 @@ var auto_repeat_song_button: CheckButton = $RepeatSongCheckButton
|
||||
var music_player_container: PanelContainer = $MusicPlayer
|
||||
|
||||
@onready
|
||||
var log: Control = %Log
|
||||
var log_window: Control = %Log
|
||||
|
||||
@onready
|
||||
var debug_label: Label = $DebugLabel
|
||||
@@ -217,7 +211,7 @@ func _input(event: InputEvent) -> void:
|
||||
if event.alt_pressed && event.keycode == KEY_K:
|
||||
shortcuts_window.visible = !shortcuts_window.visible
|
||||
if event.alt_pressed && event.keycode == KEY_L:
|
||||
log.visible = !log.visible
|
||||
log_window.visible = !log_window.visible
|
||||
|
||||
func server_updated() -> void:
|
||||
print("server_updated")
|
||||
@@ -456,7 +450,7 @@ func load_players() -> void:
|
||||
|
||||
func _on_point_given(player_given_point: int) -> void:
|
||||
print("_on_point_given")
|
||||
log.add_log_row(Settings.player_array[player_given_point].player_name + " got a point")
|
||||
log_window.add_log_row(Settings.player_array[player_given_point].player_name + " got a point")
|
||||
if Playlist.currently_playing_song >= 0:
|
||||
Playlist.add_point(player_given_point)
|
||||
update_song_list()
|
||||
@@ -466,7 +460,7 @@ func _on_make_point_given_sound() -> void:
|
||||
|
||||
func _on_point_taken(player_taken_point: int) -> void:
|
||||
print("_on_point_taken")
|
||||
log.add_log_row(Settings.player_array[player_taken_point].player_name + " lost a point")
|
||||
log_window.add_log_row(Settings.player_array[player_taken_point].player_name + " lost a point")
|
||||
music_player_container.play_sound_effect(preload("res://sounds/itemequip.wav"))
|
||||
if Playlist.currently_playing_song >= 0:
|
||||
Playlist.remove_point(player_taken_point)
|
||||
@@ -474,12 +468,7 @@ func _on_point_taken(player_taken_point: int) -> void:
|
||||
|
||||
func _on_player_won(winning_player_id: int) -> void:
|
||||
print("_on_player_won")
|
||||
winner_popup.visible = true
|
||||
winner_label.text = Settings.player_array[winning_player_id].player_name + " won!!"
|
||||
winner_picture.custom_minimum_size = Vector2(692, 300)
|
||||
winner_picture.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
||||
winner_picture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
winner_picture.texture = Settings.player_array[winning_player_id].character
|
||||
winner_window.show_winner(winning_player_id)
|
||||
music_player_container.play_song(preload("res://sounds/winning.mp3"))
|
||||
Settings.add_to_stats = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user