Skip to content

Commit 10851b2

Browse files
authored
Merge pull request #249 from endlessm/label-set-text
blocks: Add label_set_text
2 parents f1ea1c5 + 47f3568 commit 10851b2

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://ciqkywxdk4uht"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_bofov"]
4+
5+
[resource]
6+
script = ExtResource("1_bofov")
7+
name = &"label_set_text"
8+
target_node_class = "Label"
9+
description = "Set the text for the label."
10+
category = "UI"
11+
type = 2
12+
variant_type = 0
13+
display_template = "set text to {text: STRING}"
14+
code_template = "text = {text}"
15+
defaults = {}
16+
signal_name = ""
17+
scope = ""

addons/block_code/ui/constants.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ const BUILTIN_CATEGORIES_PROPS: Dictionary = {
6262
"color": Color("03aa74"),
6363
"order": 62,
6464
},
65+
"UI":
66+
{
67+
"color": Color("03aa74"),
68+
"order": 65,
69+
},
6570
"Sounds":
6671
{
6772
"color": Color("e30fc0"),

0 commit comments

Comments
 (0)