feature/select-puzzle-update (#72)
Si tu peut regarder pour finir la pull request pour l'écran de selection des puzzles ! Co-authored-by: stilobique-i7 <aurelienvlt@free.fr> Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com> Reviewed-on: Athena/game-source#72 Co-authored-by: stilobique <aurelienvlt@free.fr> Co-committed-by: stilobique <aurelienvlt@free.fr>
This commit is contained in:
+44
-17
@@ -26,57 +26,84 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 720.0
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="UI_summary" parent="MarginContainer/HBoxContainer" instance=ExtResource( 8 )]
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 446.0
|
||||
margin_bottom = 720.0
|
||||
margin_bottom = 1080.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="PanelWood" parent="MarginContainer/HBoxContainer/UI_summary" index="0"]
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="CenterContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="0"]
|
||||
margin_bottom = 271.0
|
||||
|
||||
[node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer" index="0"]
|
||||
focus_mode = 0
|
||||
margin_top = 71.0
|
||||
margin_bottom = 199.0
|
||||
|
||||
[node name="ButtonPuzzle" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="1"]
|
||||
focus_mode = 0
|
||||
margin_top = 301.0
|
||||
margin_bottom = 378.0
|
||||
|
||||
[node name="ButtonSetting" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="2"]
|
||||
focus_mode = 0
|
||||
margin_top = 408.0
|
||||
margin_bottom = 485.0
|
||||
|
||||
[node name="ButtonCredits" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="3"]
|
||||
margin_top = 515.0
|
||||
margin_bottom = 592.0
|
||||
|
||||
[node name="MarginContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="4"]
|
||||
margin_top = 622.0
|
||||
margin_bottom = 893.0
|
||||
|
||||
[node name="ButtonQuit" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="5"]
|
||||
focus_mode = 0
|
||||
margin_top = 923.0
|
||||
margin_bottom = 1000.0
|
||||
|
||||
[node name="ContainerVersion" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="6"]
|
||||
margin_top = 1030.0
|
||||
margin_bottom = 1050.0
|
||||
|
||||
[node name="MarginContainerBottom" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="7"]
|
||||
margin_top = 1080.0
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary" index="1"]
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer"]
|
||||
margin_left = 450.0
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 720.0
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 1080.0
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Title" parent="MarginContainer/HBoxContainer/MarginContainer" instance=ExtResource( 2 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 830.0
|
||||
margin_bottom = 720.0
|
||||
margin_right = 1470.0
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="Settings" parent="MarginContainer/HBoxContainer/MarginContainer" instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 0.0
|
||||
margin_right = 830.0
|
||||
margin_bottom = 720.0
|
||||
margin_right = 1470.0
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[node name="ChooseScene" parent="MarginContainer/HBoxContainer/MarginContainer" instance=ExtResource( 3 )]
|
||||
visible = false
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 0.0
|
||||
margin_top = 0.0
|
||||
margin_right = 830.0
|
||||
margin_bottom = 720.0
|
||||
margin_right = 1470.0
|
||||
margin_bottom = 1080.0
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer/TextureRect" to="." method="_on_TextureRect_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle" to="." method="_on_ButtonPuzzle_pressed"]
|
||||
|
||||
@@ -13,7 +13,7 @@ func _apply_scenes():
|
||||
_apply_scene(mlevel.new(row_index), 0)
|
||||
|
||||
func _build_path(name):
|
||||
return "MarginContainer/HBoxContainer/"+name
|
||||
return "MarginContainer/"+name
|
||||
|
||||
func _build_method(name):
|
||||
return "_on_"+name.to_lower()+"_pressed"
|
||||
@@ -28,7 +28,7 @@ func _load_texture(thumbnail):
|
||||
return load(thumbnail)
|
||||
|
||||
func _apply_scene(level, index):
|
||||
$MarginContainer/HBoxContainer.add_child(_load_scene(level.name()))
|
||||
$MarginContainer.add_child(_load_scene(level.name()))
|
||||
var node = _build_path(level.name())
|
||||
|
||||
_configure_select(level, node)
|
||||
@@ -36,13 +36,14 @@ func _apply_scene(level, index):
|
||||
configure_counter(level, node)
|
||||
|
||||
func _configure_select(level, node):
|
||||
var select = get_node(node+"/TextureRect/TextureButton")
|
||||
var selector = get_node(node+"/MarginContainer/CenterAlign/MainButton")
|
||||
var thumbnail = get_node(node+"/MarginContainer/CenterAlign/MainButton/MarginStich/ThumbnailLevel")
|
||||
|
||||
select.set_normal_texture(_load_texture(level.thumbnail()))
|
||||
select.connect("pressed", Event, _build_method(level.name()))
|
||||
thumbnail.set_texture(_load_texture(level.thumbnail()))
|
||||
selector.connect("pressed", Event, _build_method(level.name()))
|
||||
|
||||
func configure_reset(level, node, index):
|
||||
var reset = get_node(node+"/VBoxContainer/MarginContainer/ButtonReset")
|
||||
var reset = get_node(node+"/MarginContainer/CenterAlign/TabAlign/ButtonReset")
|
||||
|
||||
if int(level.object_finding()) == 0:
|
||||
reset.set_disabled(true)
|
||||
@@ -53,6 +54,6 @@ func configure_reset(level, node, index):
|
||||
reset.connect("pressed", Event, "_on_reset_level", [level, node, index, self])
|
||||
|
||||
func configure_counter(level, node):
|
||||
var count = get_node(node+"/VBoxContainer/MarginContainer2/ButtonCount/Label")
|
||||
var count = get_node(node+"/MarginContainer/CenterAlign/TabAlign/ButtonCount/MarginBottom/Label")
|
||||
|
||||
count.set_text(level.object_finding()+" / "+level.object_to_find())
|
||||
|
||||
@@ -1,47 +1,21 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/UI/choose_scenes/ChooseScene.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/levels/Template.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="ChooseScene" type="CenterContainer"]
|
||||
[node name="ChooseScene" type="ScrollContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 73.7365
|
||||
margin_top = -67.0147
|
||||
margin_right = 73.7366
|
||||
margin_bottom = -67.0146
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
scroll_horizontal_enabled = false
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
margin_left = 625.0
|
||||
margin_top = 345.0
|
||||
margin_right = 655.0
|
||||
margin_bottom = 375.0
|
||||
[node name="MarginContainer" type="GridContainer" parent="."]
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 1080.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/margin_right = 15
|
||||
custom_constants/margin_top = 15
|
||||
custom_constants/margin_left = 15
|
||||
custom_constants/margin_bottom = 15
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
margin_left = 15.0
|
||||
margin_top = 15.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 15.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 120
|
||||
|
||||
[node name="example" parent="MarginContainer/HBoxContainer" instance=ExtResource( 2 )]
|
||||
visible = false
|
||||
margin_right = 200.0
|
||||
margin_bottom = 284.0
|
||||
|
||||
[editable path="MarginContainer/HBoxContainer/example"]
|
||||
columns = 3
|
||||
|
||||
+109
-54
@@ -1,88 +1,143 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://assets/ui/themes/level-btn.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/ui/themes/UI-Button-Clear-Large.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/ui/themes/UI-Button-Reset-hover.png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/ui/themes/UI-Button-Reset.png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/ui/themes/UI-Button-Clear-Large-hover.png" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/ui/themes/UI-Button-Reset-disabled.png" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-shadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset.png" type="Texture" id=3]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-disabled.png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Count-hover.png" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-Button-Reset-hover.png" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/ui/themes/tab_select/UI-level-btn-leather.png" type="Texture" id=7]
|
||||
[ext_resource path="res://assets/fonts/kirsty/kirsty_base.tres" type="DynamicFont" id=8]
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer"]
|
||||
margin_right = 150.0
|
||||
margin_bottom = 174.0
|
||||
[node name="TilePuzzle" type="Control"]
|
||||
margin_left = 320.0
|
||||
margin_right = 1600.0
|
||||
margin_bottom = 720.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 200.0
|
||||
[node name="BackgroundTile" type="TextureRect" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -114.0
|
||||
margin_right = 115.0
|
||||
margin_bottom = 456.0
|
||||
texture = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureButton" type="TextureButton" parent="TextureRect"]
|
||||
margin_left = 25.0
|
||||
margin_top = 25.0
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -114.0
|
||||
margin_right = 115.0
|
||||
margin_bottom = 720.0
|
||||
custom_constants/margin_right = 10
|
||||
custom_constants/margin_top = 10
|
||||
custom_constants/margin_left = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_top = 204.0
|
||||
margin_right = 200.0
|
||||
margin_bottom = 284.0
|
||||
[node name="CenterAlign" type="VBoxContainer" parent="MarginContainer"]
|
||||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = 219.0
|
||||
margin_bottom = 720.0
|
||||
custom_constants/separation = 0
|
||||
|
||||
[node name="MainButton" type="TextureButton" parent="MarginContainer/CenterAlign"]
|
||||
margin_right = 209.0
|
||||
margin_bottom = 208.0
|
||||
mouse_default_cursor_shape = 2
|
||||
texture_normal = ExtResource( 7 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MarginStich" type="MarginContainer" parent="MarginContainer/CenterAlign/MainButton"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_constants/margin_right = 5
|
||||
custom_constants/margin_top = 5
|
||||
custom_constants/margin_left = 5
|
||||
custom_constants/margin_bottom = 5
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ThumbnailLevel" type="TextureRect" parent="MarginContainer/CenterAlign/MainButton/MarginStich"]
|
||||
margin_left = 5.0
|
||||
margin_top = 5.0
|
||||
margin_right = 204.0
|
||||
margin_bottom = 203.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ThumbnailLevel" type="TextureRect" parent="MarginContainer/CenterAlign/MainButton"]
|
||||
margin_left = 5.0
|
||||
margin_top = 5.0
|
||||
margin_right = 204.0
|
||||
margin_bottom = 203.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
expand = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TabAlign" type="HBoxContainer" parent="MarginContainer/CenterAlign"]
|
||||
margin_top = 208.0
|
||||
margin_right = 209.0
|
||||
margin_bottom = 710.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="CenterContainer" parent="VBoxContainer"]
|
||||
margin_right = 98.0
|
||||
margin_bottom = 80.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ButtonReset" type="TextureButton" parent="VBoxContainer/MarginContainer"]
|
||||
margin_left = 9.0
|
||||
margin_right = 89.0
|
||||
margin_bottom = 80.0
|
||||
focus_mode = 0
|
||||
[node name="ButtonReset" type="TextureButton" parent="MarginContainer/CenterAlign/TabAlign"]
|
||||
margin_left = 1.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = 57.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
disabled = true
|
||||
texture_normal = ExtResource( 4 )
|
||||
texture_hover = ExtResource( 3 )
|
||||
texture_disabled = ExtResource( 6 )
|
||||
texture_focused = ExtResource( 3 )
|
||||
texture_normal = ExtResource( 3 )
|
||||
texture_hover = ExtResource( 6 )
|
||||
texture_disabled = ExtResource( 4 )
|
||||
texture_focused = ExtResource( 6 )
|
||||
|
||||
[node name="MarginContainer2" type="CenterContainer" parent="VBoxContainer"]
|
||||
margin_left = 102.0
|
||||
margin_right = 200.0
|
||||
margin_bottom = 80.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ButtonCount" type="TextureButton" parent="VBoxContainer/MarginContainer2"]
|
||||
margin_left = 9.0
|
||||
margin_right = 89.0
|
||||
margin_bottom = 80.0
|
||||
focus_mode = 0
|
||||
[node name="ButtonCount" type="TextureButton" parent="MarginContainer/CenterAlign/TabAlign"]
|
||||
margin_left = 94.0
|
||||
margin_right = 207.0
|
||||
margin_bottom = 57.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_hover = ExtResource( 5 )
|
||||
texture_focused = ExtResource( 5 )
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/MarginContainer2/ButtonCount"]
|
||||
[node name="MarginBottom" type="MarginContainer" parent="MarginContainer/CenterAlign/TabAlign/ButtonCount"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_constants/margin_bottom = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/CenterAlign/TabAlign/ButtonCount/MarginBottom"]
|
||||
margin_right = 113.0
|
||||
margin_bottom = 47.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 7
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
text = "X / 10"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Spatial" type="Spatial"]
|
||||
|
||||
[node name="Camera" type="Camera" parent="."]
|
||||
Reference in New Issue
Block a user