mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-25 04:15:49 -04:00
Add basic support for UTF8 in the TextObject.
String expression editor now returns a std::string encoded in UTF8 Add UTF8 tools (and UTF8-CPP header library)
This commit is contained in:
@@ -131,7 +131,7 @@ mainFrameWrapper(mainFrameWrapper_)
|
||||
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&TextObjectEditor::OnokBtClick);
|
||||
//*)
|
||||
|
||||
textEdit->ChangeValue(object.GetString());
|
||||
textEdit->ChangeValue(gd::Utf8ToWxString(object.GetString()));
|
||||
fontEdit->ChangeValue(object.GetFontFilename());
|
||||
sizeEdit->SetValue(object.GetCharacterSize());
|
||||
colorBt->SetBackgroundColour(wxColour(object.GetColorR(), object.GetColorG(), object.GetColorB()));
|
||||
@@ -161,7 +161,7 @@ void TextObjectEditor::AdaptFontColor(wxButton *button)
|
||||
|
||||
void TextObjectEditor::OnokBtClick(wxCommandEvent& event)
|
||||
{
|
||||
object.SetString(gd::ToString(textEdit->GetValue()));
|
||||
object.SetString(gd::ToUtf8String(textEdit->GetValue()));
|
||||
object.SetCharacterSize(sizeEdit->GetValue());
|
||||
object.SetSmooth(smoothCheck->GetValue());
|
||||
object.SetColor(static_cast<int>(colorBt->GetBackgroundColour().Red()),
|
||||
|
||||
Reference in New Issue
Block a user