Skip to content
Snippets Groups Projects
Commit 72a6c3cb authored by SCHIEBER MORGANE's avatar SCHIEBER MORGANE :fries:
Browse files

Merge branch 'hud-mobile' into develop

parents 31eed859 66ed45c6
Branches
Tags
No related merge requests found
......@@ -5,12 +5,13 @@ var PLAYERDISPLAY
var SETTINGSDISPLAY
var MOBILEPLAYERSBUTTON
var MOBILESETTINGSBUTON
var profilePic = preload("res://models/listPlayer/profile.png")
var t = preload("res://models/listPlayer/testTheme.tres")
var panelTheme = preload("res://levels/commons/themes/panelAddFriends.tres")
# pour le moment c'est moche, dsl
# c'est à cause des thèmes
var userDamages
var userName
var userImg
......@@ -21,6 +22,8 @@ func _ready():
LISTPLAYER = $listPlayers/Panel/MarginContainer/VBoxContainer/playerContainer/marginPlayer/playersList
PLAYERDISPLAY = $listPlayers
SETTINGSDISPLAY = $settings
MOBILEPLAYERSBUTTON = $playerlistZone
MOBILESETTINGSBUTON = $settingsZone
userDamages = $MarginContainer/VBoxContainer/bas/stats/percent
userName = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/name
userImg = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/pic
......@@ -28,7 +31,7 @@ func _ready():
inventory = $MarginContainer/VBoxContainer/bas/stats/inventaire/obj
displayListPlayer()
displayNbKills(0)
showInventory("res://models/player/playerArrow/playerArrow.png")
showInventory("res://models/player/playerArrow/playerArrow.png")
func _input(ev):
if ev is InputEventKey :
......@@ -37,7 +40,7 @@ func _input(ev):
PLAYERDISPLAY.visible = true
if !ev.is_echo() and ev.scancode == KEY_TAB:
PLAYERDISPLAY.visible = false
elif ev.pressed and ev.scancode == KEY_ESCAPE and PLAYERDISPLAY.visible == false:
if SETTINGSDISPLAY.visible == false:
# print("true")
......@@ -54,7 +57,7 @@ func displayListPlayer():
# pour le moment idk comment on les recup
for id in gamestate.players:
addPlayer(str(id), "Funky Francky")
func addPlayer(playerName,characterPlayed):
var pseudo = ""+playerName+" - "+characterPlayed+""
# Create the objects to add
......@@ -82,7 +85,7 @@ func addPlayer(playerName,characterPlayed):
newPseudo.set_text(pseudo)
newPseudo.set_h_size_flags(3)
newPseudo.set_v_size_flags(4)
#newPseudo.set_theme(t)
#newPseudo.set_theme(t)
## Profile icon
newTextureProfile.set_normal_texture(profilePic)
newTextureProfile.set_expand(true)
......@@ -96,19 +99,16 @@ func addPlayer(playerName,characterPlayed):
newPlayer.add_child(newTextureProfile)
newPlayer.add_child(newPseudo)
LISTPLAYER.add_child(newPanel)
func displayDamages(value):
userDamages.text = str(value) + " %"
func displayUser(name,img):
userName.text = name
userImg.texture = load(img)
func displayNbKills(value):
nbKills.text = str(value)
func showInventory(img):
inventory.texture = load(img)
This diff is collapsed.
......@@ -104,7 +104,7 @@ margin_bottom = 115.0
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource( 4 )
text = "It's the final countdown
text = "It`s the final countdown
"
align = 1
valign = 1
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment