Skip to content

Commit 2d91906

Browse files
author
Roberto De Ioris
authored
Update Slate_API.md
1 parent cedc582 commit 2d91906

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/Slate_API.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,19 @@ window = SWindow(client_size=(128, 512), title='Slate Window', sizing_rule=0)(
544544

545545
![SImage](https://github.com/20tab/UnrealEnginePython/raw/master/docs/screenshots/slate_SImage.png)
546546

547+
Pay attention to the bIsDynamicallyLoaded field of SlateBrush, if you are passing a non-ue4 resource (via ResourceName) you have to instruct UE to load the resource as a texture (by setting bIsDynamicallyLoaded to true). This is not required when using ResourceObject.
548+
549+
Combining SButton and SImage is pretty handy:
550+
551+
```python
552+
SButton(on_clicked=lambda: ue.log('Image Clicked'))(SImage(image=SlateBrush(ResourceName=image_file, bIsDynamicallyLoaded=True)))
553+
```
554+
555+
More infos about SlateBrush:
556+
557+
https://api.unrealengine.com/INT/API/Runtime/SlateCore/Styling/FSlateBrush/index.html
558+
559+
547560
## SEditableTextBox
548561

549562

0 commit comments

Comments
 (0)