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

#143 creation of click zone

parent 6ca22026
Branches super-loading-screen
Tags
No related merge requests found
...@@ -5,12 +5,13 @@ var PLAYERDISPLAY ...@@ -5,12 +5,13 @@ var PLAYERDISPLAY
var SETTINGSDISPLAY var SETTINGSDISPLAY
var MOBILEPLAYERSBUTTON
var MOBILESETTINGSBUTON
var profilePic = preload("res://models/listPlayer/profile.png") var profilePic = preload("res://models/listPlayer/profile.png")
var t = preload("res://models/listPlayer/testTheme.tres") var t = preload("res://models/listPlayer/testTheme.tres")
var panelTheme = preload("res://levels/commons/themes/panelAddFriends.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 userDamages
var userName var userName
var userImg var userImg
...@@ -21,6 +22,8 @@ func _ready(): ...@@ -21,6 +22,8 @@ func _ready():
LISTPLAYER = $listPlayers/Panel/MarginContainer/VBoxContainer/playerContainer/marginPlayer/playersList LISTPLAYER = $listPlayers/Panel/MarginContainer/VBoxContainer/playerContainer/marginPlayer/playersList
PLAYERDISPLAY = $listPlayers PLAYERDISPLAY = $listPlayers
SETTINGSDISPLAY = $settings SETTINGSDISPLAY = $settings
MOBILEPLAYERSBUTTON = $playerlistZone
MOBILESETTINGSBUTON = $settingsZone
userDamages = $MarginContainer/VBoxContainer/bas/stats/percent userDamages = $MarginContainer/VBoxContainer/bas/stats/percent
userName = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/name userName = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/name
userImg = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/pic userImg = $MarginContainer/VBoxContainer/bas/stats/VBoxContainer/pic
...@@ -28,7 +31,22 @@ func _ready(): ...@@ -28,7 +31,22 @@ func _ready():
inventory = $MarginContainer/VBoxContainer/bas/stats/inventaire/obj inventory = $MarginContainer/VBoxContainer/bas/stats/inventaire/obj
displayListPlayer() displayListPlayer()
displayNbKills() displayNbKills()
showInventory("res://models/icon.png") showInventory("res://models/icon.png")
# Mobile HUD connections
MOBILEPLAYERSBUTTON.connect("pressed", self, "buttonMobile", ["playerList"])
MOBILESETTINGSBUTON.connect("pressed", self, "buttonMobile", ["settings"])
func buttonMobile(button_name):
if button_name == "playerList" && SETTINGSDISPLAY.visibility == false && PLAYERDISPLAY.visibility == false:
PLAYERDISPLAY.visibility = true
if button_name == "playerList" && SETTINGSDISPLAY.visibility == false && PLAYERDISPLAY.visibility == true:
PLAYERDISPLAY.visibility = false
if button_name == "settings" && SETTINGSDISPLAY.visibility == false && PLAYERDISPLAY.visibility == false:
SETTINGSDISPLAY.visibility = true
if button_name == "settings" && SETTINGSDISPLAY.visibility == true && PLAYERDISPLAY.visibility == false:
SETTINGSDISPLAY.visibility = false
func _input(ev): func _input(ev):
if ev is InputEventKey : if ev is InputEventKey :
......
...@@ -14,19 +14,15 @@ ...@@ -14,19 +14,15 @@
[sub_resource type="StreamTexture" id=1] [sub_resource type="StreamTexture" id=1]
flags = 4 flags = 4
load_path = "res://.import/hud_bg2.png-3c6e0009587ce068b78ff42b6d42129a.stex"
[sub_resource type="StreamTexture" id=2] [sub_resource type="StreamTexture" id=2]
flags = 4 flags = 4
load_path = "res://.import/hud_bg1.png-c137c7c9656bbc9c3f36f041e130cb80.stex"
[sub_resource type="StreamTexture" id=3] [sub_resource type="StreamTexture" id=3]
flags = 4 flags = 4
load_path = "res://.import/disco.png-7887829e2bd295b181d2ab6939359ff1.stex"
[sub_resource type="StreamTexture" id=4] [sub_resource type="StreamTexture" id=4]
flags = 4 flags = 4
load_path = "res://.import/case.png-3b77851e53283d3fff3d8edc79644146.stex"
[sub_resource type="StreamTexture" id=5] [sub_resource type="StreamTexture" id=5]
...@@ -100,6 +96,25 @@ __meta__ = { ...@@ -100,6 +96,25 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="playerlistZone" type="Button" parent="."]
margin_right = 309.0
margin_bottom = 201.0
flat = true
__meta__ = {
"_edit_use_anchors_": false,
"_editor_description_": ""
}
[node name="settingsZone" type="Button" parent="."]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -309.0
margin_bottom = 201.0
flat = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="bg_hud2" type="TextureRect" parent="."] [node name="bg_hud2" type="TextureRect" parent="."]
anchor_left = 1.0 anchor_left = 1.0
anchor_top = 1.0 anchor_top = 1.0
...@@ -845,3 +860,10 @@ text = " APPLIQUER " ...@@ -845,3 +860,10 @@ text = " APPLIQUER "
[node name="AnimationPlayer" type="AnimationPlayer" parent="settings"] [node name="AnimationPlayer" type="AnimationPlayer" parent="settings"]
autoplay = "fade in" autoplay = "fade in"
[node name="MarginContainer2" type="MarginContainer" parent="."]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_use_anchors_": false
}
...@@ -104,7 +104,7 @@ margin_bottom = 115.0 ...@@ -104,7 +104,7 @@ margin_bottom = 115.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource( 4 ) theme = ExtResource( 4 )
text = "It's the final countdown text = "It`s the final countdown
" "
align = 1 align = 1
valign = 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