VN textbox event

This commit is contained in:
2023-05-21 15:11:51 -07:00
parent a64df032e2
commit a6ecdfd84d
11 changed files with 42 additions and 35 deletions

View File

@ -12,7 +12,7 @@
namespace Dawn {
class SceneItemComponent;
class SceneItem {
class SceneItem : public StateOwner {
private:
std::vector<SceneItemComponent*> components;

View File

@ -111,6 +111,10 @@ void UILabel::onStart() {
alignmentNeedsUpdating = true;
}, { &fontSize, &font, &text, &maxWidth, &startQuad, &quadCount });
useEffect([&]{
eventTextChanged.invoke();
}, text);
useEffect([&]{
needsRebuffering = true;
}, alignmentNeedsUpdating);

View File

@ -45,6 +45,7 @@ namespace Dawn {
StateProperty<int32_t> quadCount;
StateEvent<> eventFontRebuffered;
StateEvent<> eventTextChanged;
struct FontMeasure measure;