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