Skip to content

Commit db819ee

Browse files
committed
Add a couple of rich-text tooltips
1 parent 80ea0ba commit db819ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,21 @@ static func get_general_blocks() -> Array[Block]:
206206
b.block_formats = ["repeat {number: INT}"]
207207
b.statements = ["for i in {number}:"]
208208
b.category = "Loops"
209+
b.tooltip_text = "Run the connected blocks [i]number[/i] times"
209210
block_list.append(b)
210211

211212
b = BLOCKS["control_block"].instantiate()
212213
b.block_formats = ["while {condition: BOOL}"]
213214
b.statements = ["while {condition}:"]
214215
b.category = "Loops"
216+
b.tooltip_text = (
217+
"""
218+
Run the connected blocks as long as [i]condition[/i] is true.
219+
220+
Hint: snap a [b]Comparison[/b] block into the condition.
221+
"""
222+
. dedent()
223+
)
215224
block_list.append(b)
216225

217226
b = BLOCKS["statement_block"].instantiate()

0 commit comments

Comments
 (0)