Skip to content

Commit f260d37

Browse files
author
Roberto De Ioris
authored
Update Slate_API.md
1 parent be2692b commit f260d37

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/Slate_API.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,40 @@ window.set_content(SBorder()(horizontal_box))
348348

349349
You can obviously combine vertical and horizontal boxes (this time using 'visual' style)
350350

351+
```python
352+
from unreal_engine import SWindow, STextBlock, SHorizontalBox, SVerticalBox, SBorder, FLinearColor
353+
from unreal_engine.enums import EVerticalAlignment, EHorizontalAlignment, ETextJustify
354+
from unreal_engine.structs import Margin, SlateColor
355+
356+
SWindow(client_size=(512, 256), title='Slate Window')(
357+
SVerticalBox()
358+
(
359+
SHorizontalBox()
360+
(
361+
SBorder()(STextBlock(text='Left top', justification=ETextJustify.Center)), v_align=EVerticalAlignment.VAlign_Fill
362+
)
363+
(
364+
SBorder(border_background_color=SlateColor(SpecifiedColor=FLinearColor.Green))(STextBlock(text='Right top', highlight_text='Right'))
365+
)
366+
)
367+
(
368+
SHorizontalBox()
369+
(
370+
SBorder(border_background_color=SlateColor(SpecifiedColor=FLinearColor(1, 0, 0)), padding=20)
371+
(
372+
STextBlock(text='Left bottom')
373+
), v_align=EVerticalAlignment.VAlign_Fill
374+
)
375+
(
376+
SBorder()(STextBlock(text='Middle bottom', justification=ETextJustify.Right)), v_align=EVerticalAlignment.VAlign_Center
377+
)
378+
(
379+
SBorder(border_background_color=SlateColor(SpecifiedColor=FLinearColor.Yellow))(STextBlock(text='Right bottom')), v_align=EVerticalAlignment.VAlign_Fill
380+
)
381+
)
382+
)
383+
```
384+
351385
## SGridPanel
352386

353387
## SScrollBox

0 commit comments

Comments
 (0)