18 lines
376 B
Markdown
18 lines
376 B
Markdown
|
|
```python
|
||
|
|
func create_button_pink() -> void:
|
||
|
|
var button := Button.new()
|
||
|
|
row_bodies.add_child(button)
|
||
|
|
```
|
||
|
|
|
||
|
|
|
||
|
|
```python
|
||
|
|
func create_buttons() -> void:
|
||
|
|
for current_body: String in bodies:
|
||
|
|
var button := Button.new()
|
||
|
|
row_bodies.add_child(button)
|
||
|
|
button.text = current_body.capitalize()
|
||
|
|
button.pressed.connect(func()-> void:
|
||
|
|
body.texture = bodies[current_body]
|
||
|
|
)
|
||
|
|
```
|