Skip to content

Commit fd95141

Browse files
committed
Removes labels, removes subcategories, adds custom icons
Adds a lot of custom icons that are used by the category picker and removes the labels and subcategories
1 parent 5c1785b commit fd95141

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+789
-1062
lines changed

addons/block_code/ui/constants.gd

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,155 +24,156 @@ const BUILTIN_CATEGORIES_PROPS: Dictionary = {
2424
{
2525
"color": Color("ec3b59"),
2626
"order": 10,
27-
"icon": "PlayStart",
27+
"icon": "lifecycle",
2828
},
2929
"Lifecycle | Game":
3030
{
3131
"color": Color("ec3b59"),
3232
"order": 12,
33+
"icon": "lifecycle",
3334
},
3435
"Lifecycle | Spawn":
3536
{
3637
"color": Color("ec3b59"),
3738
"order": 15,
38-
"icon": "Play",
39+
"icon": "lifecycle",
3940
},
4041
"Transform | Position":
4142
{
4243
"color": Color("4b6584"),
4344
"order": 20,
44-
"icon": "ToolMove",
45+
"icon": "transform",
4546
},
4647
"Transform | Rotation":
4748
{
4849
"color": Color("4b6584"),
4950
"order": 30,
50-
"icon": "ToolMove",
51+
"icon": "transform",
5152
},
5253
"Transform | Scale":
5354
{
5455
"color": Color("4b6584"),
5556
"order": 40,
56-
"icon": "ToolMove",
57+
"icon": "transform",
5758
},
5859
"Graphics | Modulate":
5960
{
6061
"color": Color("03aa74"),
6162
"order": 50,
62-
"icon": "Paint",
63+
"icon": "graphics",
6364
},
6465
"Graphics | Visibility":
6566
{
6667
"color": Color("03aa74"),
6768
"order": 60,
68-
"icon": "Paint",
69+
"icon": "graphics",
6970
},
7071
"Graphics | Viewport":
7172
{
7273
"color": Color("03aa74"),
7374
"order": 61,
74-
"icon": "Paint",
75+
"icon": "graphics",
7576
},
7677
"Graphics | Animation":
7778
{
7879
"color": Color("03aa74"),
7980
"order": 62,
80-
"icon": "Paint",
81+
"icon": "graphics",
8182
},
8283
"UI":
8384
{
8485
"color": Color("03aa74"),
8586
"order": 65,
86-
"icon": "ThemeDeselectAll",
87+
"icon": "ui",
8788
},
8889
"Sounds":
8990
{
9091
"color": Color("e30fc0"),
9192
"order": 70,
92-
"icon": "AudioStreamPlayer",
93+
"icon": "sounds",
9394
},
9495
"Physics | Mass":
9596
{
9697
"color": Color("a5b1c2"),
9798
"order": 80,
98-
"icon": "RigidBody2D",
99+
"icon": "physics",
99100
},
100101
"Physics | Velocity":
101102
{
102103
"color": Color("a5b1c2"),
103104
"order": 90,
104-
"icon": "RigidBody2D",
105+
"icon": "physics",
105106
},
106107
"Input":
107108
{
108109
"color": Color("d54322"),
109110
"order": 100,
110-
"icon": "Slot",
111+
"icon": "input",
111112
},
112113
"Communication | Methods":
113114
{
114115
"color": Color("4b7bec"),
115116
"order": 110,
116-
"icon": "Signals",
117+
"icon": "communication",
117118
},
118119
"Communication | Nodes":
119120
{
120121
"color": Color("4b7bec"),
121122
"order": 115,
122-
"icon": "Signals",
123+
"icon": "communication",
123124
},
124125
"Communication | Groups":
125126
{
126127
"color": Color("4b7bec"),
127128
"order": 120,
128-
"icon": "Signals",
129+
"icon": "communication",
129130
},
130131
"Info | Score":
131132
{
132133
"color": Color("cf6a87"),
133134
"order": 130,
134-
"icon": "NodeInfo",
135+
"icon": "info",
135136
},
136137
"Loops":
137138
{
138139
"color": Color("20bf6b"),
139140
"order": 140,
140-
"icon": "RotateRight",
141+
"icon": "loops",
141142
},
142143
"Logic | Conditionals":
143144
{
144145
"color": Color("45aaf2"),
145146
"order": 150,
146-
"icon": "AnimationFilter",
147+
"icon": "logic",
147148
},
148149
"Logic | Comparison":
149150
{
150151
"color": Color("45aaf2"),
151152
"order": 160,
152-
"icon": "AnimationFilter",
153+
"icon": "logic",
153154
},
154155
"Logic | Boolean":
155156
{
156157
"color": Color("45aaf2"),
157158
"order": 170,
158-
"icon": "AnimationFilter",
159+
"icon": "logic",
159160
},
160161
"Variables":
161162
{
162163
"color": Color("e06000"),
163164
"order": 180,
164-
"icon": "Key",
165+
"icon": "variables",
165166
},
166167
"Math":
167168
{
168169
"color": Color("a55eea"),
169170
"order": 190,
170-
"icon": "VisualShaderNodeVectorFunc",
171+
"icon": "math",
171172
},
172173
"Log":
173174
{
174175
"color": Color("002050"),
175176
"order": 200,
176-
"icon": "Debug",
177+
"icon": "log",
177178
},
178179
}

addons/block_code/ui/picker/categories/block_category.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var icon: String
66
var order: int
77

88

9-
func _init(p_name: String = "", p_color: Color = Color.WHITE, p_icon: String = "FileBroken", p_order: int = 0):
9+
func _init(p_name: String = "", p_color: Color = Color.WHITE, p_icon: String = "file_broken", p_order: int = 0):
1010
name = p_name
1111
color = p_color
1212
icon = p_icon

addons/block_code/ui/picker/categories/block_category_button.gd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ signal selected
99
var category: BlockCategory
1010

1111
@onready var _panel := %Panel
12-
@onready var _icon := %Icon
1312
@onready var _button := %Button
1413

1514

@@ -19,7 +18,7 @@ func _ready():
1918

2019
if not self.is_part_of_edited_scene():
2120
var texture = load("res://addons/block_code/ui/picker/categories/icons/" + category.icon + ".svg")
22-
_icon.texture = texture
21+
_button.icon = texture
2322
_panel.modulate = category.color
2423

2524
_button.tooltip_text = tr(category.name.get_slice(" |", 0))
Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,52 @@
11
[gd_scene load_steps=8 format=3 uid="uid://bdtetj0gs45hv"]
22

33
[ext_resource type="Script" path="res://addons/block_code/ui/picker/categories/block_category_button.gd" id="1_pxxnl"]
4-
[ext_resource type="Texture2D" uid="uid://cn4ub7dwl4ae5" path="res://addons/block_code/ui/picker/categories/category_icons/block_code_node.svg" id="2_s8lmp"]
4+
[ext_resource type="Texture2D" uid="uid://g10ct6m5goi6" path="res://addons/block_code/ui/picker/categories/icons/file_broken.svg" id="2_0c1ke"]
55

66
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w0e7p"]
77
bg_color = Color(1, 1, 1, 1)
8-
corner_radius_top_left = 4
9-
corner_radius_top_right = 4
10-
corner_radius_bottom_right = 4
11-
corner_radius_bottom_left = 4
8+
corner_radius_top_left = 5
9+
corner_radius_top_right = 5
10+
corner_radius_bottom_right = 5
11+
corner_radius_bottom_left = 5
1212

1313
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dgecf"]
1414

1515
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fyk0j"]
1616
bg_color = Color(1, 1, 1, 0.196078)
17+
corner_radius_top_left = 5
18+
corner_radius_top_right = 5
19+
corner_radius_bottom_right = 5
20+
corner_radius_bottom_left = 5
1721

1822
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ha83k"]
1923
bg_color = Color(1, 1, 1, 0.392157)
24+
corner_radius_top_left = 5
25+
corner_radius_top_right = 5
26+
corner_radius_bottom_right = 5
27+
corner_radius_bottom_left = 5
2028

2129
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ousiv"]
2230

2331
[node name="BlockCategoryButton" type="MarginContainer"]
24-
custom_minimum_size = Vector2(140, 0)
25-
offset_right = 148.0
26-
offset_bottom = 32.0
2732
script = ExtResource("1_pxxnl")
2833

29-
[node name="HBoxContainer" type="HBoxContainer" parent="."]
30-
layout_mode = 2
31-
32-
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer"]
33-
custom_minimum_size = Vector2(40, 40)
34-
layout_mode = 2
35-
theme_override_constants/margin_left = 8
36-
theme_override_constants/margin_top = 8
37-
theme_override_constants/margin_right = 8
38-
theme_override_constants/margin_bottom = 8
39-
40-
[node name="Panel" type="Panel" parent="HBoxContainer/MarginContainer"]
34+
[node name="Panel" type="Panel" parent="."]
4135
unique_name_in_owner = true
4236
layout_mode = 2
4337
theme_override_styles/panel = SubResource("StyleBoxFlat_w0e7p")
4438

45-
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/MarginContainer"]
46-
layout_mode = 2
47-
theme_override_constants/margin_left = 4
48-
theme_override_constants/margin_top = 4
49-
theme_override_constants/margin_right = 4
50-
theme_override_constants/margin_bottom = 4
51-
52-
[node name="Icon" type="TextureRect" parent="HBoxContainer/MarginContainer/MarginContainer"]
53-
unique_name_in_owner = true
54-
layout_mode = 2
55-
texture = ExtResource("2_s8lmp")
56-
57-
[node name="Label" type="Label" parent="HBoxContainer"]
58-
unique_name_in_owner = true
59-
layout_mode = 2
60-
text = "Example"
61-
6239
[node name="Button" type="Button" parent="."]
6340
unique_name_in_owner = true
6441
layout_mode = 2
42+
size_flags_horizontal = 4
6543
tooltip_text = "Example"
6644
mouse_default_cursor_shape = 2
6745
theme_override_styles/focus = SubResource("StyleBoxEmpty_dgecf")
6846
theme_override_styles/hover = SubResource("StyleBoxFlat_fyk0j")
6947
theme_override_styles/pressed = SubResource("StyleBoxFlat_ha83k")
7048
theme_override_styles/normal = SubResource("StyleBoxEmpty_ousiv")
49+
icon = ExtResource("2_0c1ke")
50+
icon_alignment = 1
7151

7252
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

addons/block_code/ui/picker/categories/category_icons/AnimationFilter.svg

Lines changed: 0 additions & 34 deletions
This file was deleted.

addons/block_code/ui/picker/categories/category_icons/AudioStreamPlayer.svg

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)