Skip to content

Commit 5cea5c8

Browse files
committed
Add a couple of rich-text tooltips
1 parent 3fb2d3f commit 5cea5c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,18 @@ 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+
Run the connected blocks as long as [i]condition[/i] is true.
218+
219+
Hint: snap a [b]Comparison[/b] block into the condition.
220+
""".dedent()
215221
block_list.append(b)
216222

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

0 commit comments

Comments
 (0)