Skip to content

Commit

Permalink
Improved resolution of collapse/expand icon and added | separator on …
Browse files Browse the repository at this point in the history
…animationplayer_play.

This commit adds SVG icons to collapse/expand and modifies the template string of animationplayer_play.tres to hide advanced settings.
Fixes #288.
  • Loading branch information
joaquin30 committed Dec 17, 2024
1 parent 7dcd95a commit 00c0317
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ description = "Play the animation."
category = "Graphics | Animation"
type = 2
variant_type = 0
display_template = "play {animation: STRING} {direction: NIL} {wait_mode: NIL}"
display_template = "play {animation: STRING} | {direction: NIL} {wait_mode: NIL}"
code_template = "if {direction} == \"forward\":
play({animation})
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://1xfpd777g8pf"]

[ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/template_editor/collapsable_settings.gd" id="1_f0ssn"]
[ext_resource type="Texture2D" uid="uid://br7yvjjtbuups" path="res://addons/block_code/ui/blocks/utilities/template_editor/plus.png" id="2_8s057"]
[ext_resource type="Texture2D" uid="uid://di3ona3fudjkx" path="res://addons/block_code/ui/blocks/utilities/template_editor/minus.png" id="3_6qcv3"]
[ext_resource type="Texture2D" uid="uid://cd243la33evh" path="res://addons/block_code/ui/blocks/utilities/template_editor/plus.svg" id="2_mp58d"]
[ext_resource type="Texture2D" uid="uid://dmplpvmlpcdrk" path="res://addons/block_code/ui/blocks/utilities/template_editor/minus.svg" id="3_adq5s"]

[node name="CollapsableSettings" type="HBoxContainer"]
offset_right = 36.0
Expand All @@ -12,14 +12,14 @@ script = ExtResource("1_f0ssn")
[node name="ExpandSettingsButton" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 2
icon = ExtResource("2_8s057")
icon = ExtResource("2_mp58d")
flat = true
icon_alignment = 1

[node name="CollapseSettingsButton" type="Button" parent="."]
unique_name_in_owner = true
custom_minimum_size = Vector2(20, 20)
layout_mode = 2
icon = ExtResource("3_6qcv3")
icon = ExtResource("3_adq5s")
flat = true
icon_alignment = 1
Binary file not shown.
56 changes: 56 additions & 0 deletions addons/block_code/ui/blocks/utilities/template_editor/minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://br7yvjjtbuups"
path="res://.godot/imported/plus.png-415014510d01c9db50069dbfc9e6ab6f.ctex"
uid="uid://dmplpvmlpcdrk"
path="res://.godot/imported/minus.svg-91b3ae6e73af60de8d208e1e34387d89.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/block_code/ui/blocks/utilities/template_editor/plus.png"
dest_files=["res://.godot/imported/plus.png-415014510d01c9db50069dbfc9e6ab6f.ctex"]
source_file="res://addons/block_code/ui/blocks/utilities/template_editor/minus.svg"
dest_files=["res://.godot/imported/minus.svg-91b3ae6e73af60de8d208e1e34387d89.ctex"]

[params]

Expand All @@ -32,3 +32,6 @@ process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
Binary file not shown.
63 changes: 63 additions & 0 deletions addons/block_code/ui/blocks/utilities/template_editor/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://di3ona3fudjkx"
path="res://.godot/imported/minus.png-7cbe293178ea19d9e5fbc8ba50c3a01b.ctex"
uid="uid://cd243la33evh"
path="res://.godot/imported/plus.svg-ca1f07941354f8a370925e9c4f909843.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/block_code/ui/blocks/utilities/template_editor/minus.png"
dest_files=["res://.godot/imported/minus.png-7cbe293178ea19d9e5fbc8ba50c3a01b.ctex"]
source_file="res://addons/block_code/ui/blocks/utilities/template_editor/plus.svg"
dest_files=["res://.godot/imported/plus.svg-ca1f07941354f8a370925e9c4f909843.ctex"]

[params]

Expand All @@ -32,3 +32,6 @@ process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

0 comments on commit 00c0317

Please sign in to comment.