forked from unfa/liblast
Fixed scoretab
parent
5797bf44fa
commit
f8fa335207
|
@ -10,7 +10,7 @@ extends Control
|
|||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
func update_score_table():
|
||||
func update_scoretab():
|
||||
$ScoreTable/VBoxContainer/ScoreTab.text = ''
|
||||
|
||||
var scores = []
|
||||
|
@ -26,10 +26,9 @@ func update_score_table():
|
|||
if main.player_list.get(j).score == i:
|
||||
$ScoreTable/VBoxContainer/ScoreTab.text += str(i) + " - " + main.player_list.get(j).name + "\n"
|
||||
|
||||
func score_table(show := true):
|
||||
|
||||
func scoretab(show := true):
|
||||
if show:
|
||||
update_score_table()
|
||||
update_scoretab()
|
||||
$ScoreTable.show()
|
||||
else:
|
||||
$ScoreTable.hide()
|
||||
|
@ -49,4 +48,4 @@ func _process(delta):
|
|||
$RespawnCountdown.visible = false
|
||||
|
||||
if $ScoreTable.visible: # update the scores every frame when player is watching the score table
|
||||
update_score_table()
|
||||
update_scoretab()
|
||||
|
|
|
@ -301,14 +301,7 @@ offset_right = 619.0
|
|||
offset_bottom = 315.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "blah
|
||||
blblblbblbl
|
||||
blblb
|
||||
blb
|
||||
lb
|
||||
lb
|
||||
lb
|
||||
lblblbbl"
|
||||
text = "scoretab"
|
||||
custom_effects = []
|
||||
structured_text_bidi_override_options = []
|
||||
script = null
|
||||
|
|
|
@ -6,8 +6,8 @@ enum NetworkRole {NONE, CLIENT, SERVER, DEDICATED_SERVER, RELAY_SERVER}
|
|||
|
||||
const NET_PORT = 12597
|
||||
|
||||
const NET_SERVER = "liblast.unfa.xyz"
|
||||
#const NET_SERVER = "localhost"
|
||||
#const NET_SERVER = "liblast.unfa.xyz"
|
||||
const NET_SERVER = "localhost"
|
||||
|
||||
var peer = ENetMultiplayerPeer.new()
|
||||
|
||||
|
@ -170,6 +170,11 @@ func _input(_event) -> void:
|
|||
elif focus == GameFocus.MENU:
|
||||
focus = GameFocus.GAME
|
||||
|
||||
if Input.is_action_just_pressed("show_scoretab"):
|
||||
hud.scoretab(true)
|
||||
elif Input.is_action_just_released("show_scoretab"):
|
||||
hud.scoretab(false)
|
||||
|
||||
#@remote func st(player_list):
|
||||
# self.player_list = player_list
|
||||
|
||||
|
|
Loading…
Reference in New Issue