Skip to content

Commit 1a18e22

Browse files
committed
Updated text block code to new API
1 parent 0a2fc0e commit 1a18e22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/UnrealEnginePython/Private/Slate/UEPySTextBlock.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ static PyObject *py_ue_stext_block_set_text(ue_PySTextBlock *self, PyObject * ar
1111
return nullptr;
1212
}
1313

14+
#if ENGINE_MINOR_VERSION < 25
1415
py_STextBlock->SetText(FString(UTF8_TO_TCHAR(text)));
16+
#else
17+
FText tempText;
18+
tempText.FromString(FString(UTF8_TO_TCHAR(text)));
19+
py_STextBlock->SetText(tempText);
20+
#endif
1521

1622
Py_RETURN_SLATE_SELF;
1723
}

0 commit comments

Comments
 (0)