@@ -505,6 +505,45 @@ More infos here: https://api.unrealengine.com/INT/API/Runtime/Slate/Widgets/Inpu
505505
506506## SImage
507507
508+ This widget draw graphics resources (images, solid blocks).
509+
510+ ``` python
511+ from unreal_engine import SWindow, SImage, SVerticalBox, FLinearColor, SBorder
512+ from unreal_engine.structs import SlateBrush, SlateColor, Vector2D
513+ from unreal_engine.classes import Texture2D
514+ import unreal_engine as ue
515+ import os
516+
517+ plugin = unreal_engine.find_plugin(' UnrealEnginePython' )
518+ plugin_base_dir = plugin.get_base_dir()
519+
520+ image_file = os.path.join(plugin_base_dir, ' Resources/Icon128.png' )
521+
522+ texture = ue.load_object(Texture2D, ' /Game/Mannequin/Character/Textures/UE4_LOGO_CARD' )
523+
524+
525+ window = SWindow(client_size = (128 , 512 ), title = ' Slate Window' , sizing_rule = 0 )(
526+ SVerticalBox()
527+ (
528+ SImage(image = SlateBrush(ResourceName = image_file, bIsDynamicallyLoaded = True )),
529+ )
530+ (
531+ SImage(image = SlateBrush(ResourceObject = texture))
532+ )
533+ (
534+ SImage(image = SlateBrush(TintColor = SlateColor(SpecifiedColor = FLinearColor(1 , 0 , 0 ))))
535+ )
536+ (
537+ SImage(image = SlateBrush(ResourceName = image_file, bIsDynamicallyLoaded = True , TintColor = SlateColor(SpecifiedColor = FLinearColor(0 , 1 , 0 ))))
538+ )
539+ (
540+ SBorder()(SImage(image = SlateBrush(ResourceObject = texture, ImageSize = Vector2D(X = 64 , Y = 64 )))), auto_height=True
541+ )
542+ )
543+ ```
544+
545+ ![ SImage] ( https://github.com/20tab/UnrealEnginePython/raw/master/docs/screenshots/slate_SImage.png )
546+
508547## SEditableTextBox
509548
510549
0 commit comments