From 0939e5f05b5b78b8eb1bc21e29b1e6a12026b9f2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Mar 2023 18:35:43 +0100 Subject: [PATCH] Added support for changing the BusyComponent text dynamically --- es-core/src/components/BusyComponent.cpp | 1 - es-core/src/components/BusyComponent.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/BusyComponent.cpp b/es-core/src/components/BusyComponent.cpp index d9a32e3ed..86d4796b5 100644 --- a/es-core/src/components/BusyComponent.cpp +++ b/es-core/src/components/BusyComponent.cpp @@ -10,7 +10,6 @@ #include "components/AnimatedImageComponent.h" #include "components/ImageComponent.h" -#include "components/TextComponent.h" // Animation definition. AnimationFrame BUSY_ANIMATION_FRAMES[] { diff --git a/es-core/src/components/BusyComponent.h b/es-core/src/components/BusyComponent.h index d0b957df2..4b7c54b8c 100644 --- a/es-core/src/components/BusyComponent.h +++ b/es-core/src/components/BusyComponent.h @@ -12,6 +12,7 @@ #include "GuiComponent.h" #include "components/ComponentGrid.h" #include "components/NinePatchComponent.h" +#include "components/TextComponent.h" class AnimatedImageComponent; class TextComponent; @@ -21,6 +22,7 @@ class BusyComponent : public GuiComponent public: BusyComponent(); + void setText(const std::string& text) { mText->setText(text, true); } void onSizeChanged() override; void reset(); // Reset to frame 0.