Fixed crashing on empty string for UIRichTextLabel

This commit is contained in:
YourWishes committed 2023-06-19 12:04:26 -07:00
1 parent c01f484a87
commit 811271dc5d
3 files changed
+3 -5

No files matched your search

@@ -22,9 +22,6 @@
alignY="UI_COMPONENT_ALIGN_MIDDLE"
ref="uiLabel"
>
<font font="font_main" size="32">
Hello world!
</font>
</UIRichTextLabel>
</child>
@@ -30,6 +30,7 @@ void UIRichTextLabel::onStart() {
std::function<void(Xml*)> parseChildren = [&](Xml *node) {
if(node->children.empty()) {
if(node->node == "root") return;
struct UILabelText text;
text.style = current;
text.text = node->value;
+2 -2
View File
@@ -10,6 +10,6 @@
using namespace Dawn;
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
return new HelloWorldScene(game);
// return new Scene1Prologue(game);
// return new HelloWorldScene(game);
return new Scene1Prologue(game);
}