VN textbox event
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
namespace Dawn {
|
||||
class SceneItemComponent;
|
||||
|
||||
class SceneItem {
|
||||
class SceneItem : public StateOwner {
|
||||
private:
|
||||
std::vector<SceneItemComponent*> components;
|
||||
|
||||
|
@ -111,6 +111,10 @@ void UILabel::onStart() {
|
||||
alignmentNeedsUpdating = true;
|
||||
}, { &fontSize, &font, &text, &maxWidth, &startQuad, &quadCount });
|
||||
|
||||
useEffect([&]{
|
||||
eventTextChanged.invoke();
|
||||
}, text);
|
||||
|
||||
useEffect([&]{
|
||||
needsRebuffering = true;
|
||||
}, alignmentNeedsUpdating);
|
||||
|
@ -45,6 +45,7 @@ namespace Dawn {
|
||||
StateProperty<int32_t> quadCount;
|
||||
|
||||
StateEvent<> eventFontRebuffered;
|
||||
StateEvent<> eventTextChanged;
|
||||
|
||||
struct FontMeasure measure;
|
||||
|
||||
|
Reference in New Issue
Block a user