Skip to content

Commit 340b94a

Browse files
author
Roberto De Ioris
committed
fixed compilation on engine < 4.16
1 parent ad6d1ce commit 340b94a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Source/UnrealEnginePython/Private/Slate/UEPySImage.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ static PyObject *py_ue_simage_set_texture(ue_PySImage *self, PyObject * args) {
4444
tint = py_color->color;
4545
}
4646

47+
#if ENGINE_MINOR_VERSION > 15
4748
self->brush = FSlateImageBrush(texture, FVector2D(texture->GetSurfaceWidth(), texture->GetSurfaceHeight()), tint);
49+
#else
50+
self->brush = FSlateBrush();
51+
self->brush.ImageSize = FVector2D(texture->GetSurfaceWidth(), texture->GetSurfaceHeight());
52+
self->brush.SetResourceObject(texture);
53+
self->brush.TintColor = tint;
54+
#endif
4855

4956
sw_image->SetImage(&self->brush);
5057

0 commit comments

Comments
 (0)