Merge pull request 'Update select scene item, clean old button reset and add *button reset* and *button large*.' (#48) from feature/polish-ui-select-level into dev

Reviewed-on: Athena/game-source#48
This commit is contained in:
stilobique
2021-05-15 17:31:24 +02:00
14 changed files with 182 additions and 35 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/UI-Button-Clear-Large-hover.png-4ef91a044c3d0a5c930d923d6d16ea3e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/themes/UI-Button-Clear-Large-hover.png"
dest_files=[ "res://.import/UI-Button-Clear-Large-hover.png-4ef91a044c3d0a5c930d923d6d16ea3e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/UI-Button-Clear-Large.png-48a0be253108dc6523fa7fe763751b8b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/themes/UI-Button-Clear-Large.png"
dest_files=[ "res://.import/UI-Button-Clear-Large.png-48a0be253108dc6523fa7fe763751b8b.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/UI-Button-Reset-disabled.png-208da0fd0002a57d1eba67dd463ab012.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/themes/UI-Button-Reset-disabled.png"
dest_files=[ "res://.import/UI-Button-Reset-disabled.png-208da0fd0002a57d1eba67dd463ab012.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/UI-Button-Reset-hover.png-5fee2391ba901498b154673eb38cf236.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/themes/UI-Button-Reset-hover.png"
dest_files=[ "res://.import/UI-Button-Reset-hover.png-5fee2391ba901498b154673eb38cf236.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@@ -2,15 +2,15 @@
importer="texture" importer="texture"
type="StreamTexture" type="StreamTexture"
path="res://.import/icon-reset.png-d000c25cd26938ceb23700c305ecc4f1.stex" path="res://.import/UI-Button-Reset.png-b3f02437d8e286899b996bc43eb4fc8b.stex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://assets/ui/themes/icon-reset.png" source_file="res://assets/ui/themes/UI-Button-Reset.png"
dest_files=[ "res://.import/icon-reset.png-d000c25cd26938ceb23700c305ecc4f1.stex" ] dest_files=[ "res://.import/UI-Button-Reset.png-b3f02437d8e286899b996bc43eb4fc8b.stex" ]
[params] [params]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

+2 -2
View File
@@ -52,13 +52,13 @@ func _configure_select(level, node):
select.connect("pressed", self, _build_method(level.name())) select.connect("pressed", self, _build_method(level.name()))
func _configure_reset(level, node): func _configure_reset(level, node):
var reset = get_node(node+"/VBoxContainer/ButtonReset") var reset = get_node(node+"/VBoxContainer/MarginContainer/ButtonReset")
if int(level.object_finding()) != 0: if int(level.object_finding()) != 0:
reset.set_disabled(true) reset.set_disabled(true)
reset.connect("pressed", self, "_on_reset_level") reset.connect("pressed", self, "_on_reset_level")
func _configure_counter(level, node): func _configure_counter(level, node):
var count = get_node(node+"/VBoxContainer/ButtonCount/Label") var count = get_node(node+"/VBoxContainer/MarginContainer2/ButtonCount/Label")
count.set_text(level.object_finding()+" / "+level.object_to_find()) count.set_text(level.object_finding()+" / "+level.object_to_find())
+2
View File
@@ -41,5 +41,7 @@ custom_constants/separation = 120
[node name="example" parent="MarginContainer/HBoxContainer" instance=ExtResource( 2 )] [node name="example" parent="MarginContainer/HBoxContainer" instance=ExtResource( 2 )]
visible = false visible = false
margin_right = 200.0
margin_bottom = 284.0
[editable path="MarginContainer/HBoxContainer/example"] [editable path="MarginContainer/HBoxContainer/example"]
+39 -30
View File
@@ -1,7 +1,11 @@
[gd_scene load_steps=3 format=2] [gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/ui/themes/level-btn.png" type="Texture" id=1] [ext_resource path="res://assets/ui/themes/level-btn.png" type="Texture" id=1]
[ext_resource path="res://assets/ui/themes/icon-reset.png" type="Texture" id=2] [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]
[node name="VBoxContainer" type="VBoxContainer"] [node name="VBoxContainer" type="VBoxContainer"]
margin_right = 150.0 margin_right = 150.0
@@ -11,7 +15,7 @@ __meta__ = {
} }
[node name="TextureRect" type="TextureRect" parent="."] [node name="TextureRect" type="TextureRect" parent="."]
margin_right = 217.0 margin_right = 200.0
margin_bottom = 200.0 margin_bottom = 200.0
texture = ExtResource( 1 ) texture = ExtResource( 1 )
__meta__ = { __meta__ = {
@@ -32,41 +36,46 @@ __meta__ = {
[node name="VBoxContainer" type="HBoxContainer" parent="."] [node name="VBoxContainer" type="HBoxContainer" parent="."]
margin_top = 204.0 margin_top = 204.0
margin_right = 217.0 margin_right = 200.0
margin_bottom = 332.0 margin_bottom = 284.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
custom_constants/separation = 25
alignment = 1 alignment = 1
[node name="ButtonReset" type="TextureButton" parent="VBoxContainer"] [node name="MarginContainer" type="CenterContainer" parent="VBoxContainer"]
margin_right = 64.0 margin_right = 98.0
margin_bottom = 128.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
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
disabled = true
texture_normal = ExtResource( 4 )
texture_hover = ExtResource( 3 )
texture_disabled = ExtResource( 6 )
texture_focused = ExtResource( 3 )
[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
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
texture_normal = ExtResource( 2 ) texture_normal = ExtResource( 2 )
texture_hover = ExtResource( 5 )
texture_focused = ExtResource( 5 )
[node name="Label" type="Label" parent="VBoxContainer/ButtonReset"] [node name="Label" type="Label" parent="VBoxContainer/MarginContainer2/ButtonCount"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 7
text = "Reset"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ButtonCount" type="TextureButton" parent="VBoxContainer"]
margin_left = 89.0
margin_right = 217.0
margin_bottom = 128.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
texture_normal = ExtResource( 2 )
[node name="Label" type="Label" parent="VBoxContainer/ButtonCount"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
size_flags_horizontal = 3 size_flags_horizontal = 3