Sdk/TextAreaWidget: Add OnTextChanged signal
This commit is contained in:
parent
bb6e032b60
commit
e3f21b7268
|
|
@ -17,6 +17,7 @@ Nazara Development Kit:
|
||||||
- Fix World movement which could cause crashes when updating systems
|
- Fix World movement which could cause crashes when updating systems
|
||||||
- Fix crash occuring sometimes on keyboard event
|
- Fix crash occuring sometimes on keyboard event
|
||||||
- Add support for EchoMode to TextAreaWidget (which allows to setup password text area)
|
- Add support for EchoMode to TextAreaWidget (which allows to setup password text area)
|
||||||
|
- Add signal OnTextChanged to TextAreaWidget
|
||||||
|
|
||||||
# 0.4:
|
# 0.4:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ namespace Ndk
|
||||||
NazaraSignal(OnTextAreaKeyReturn, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
NazaraSignal(OnTextAreaKeyReturn, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
||||||
NazaraSignal(OnTextAreaKeyRight, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
NazaraSignal(OnTextAreaKeyRight, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
||||||
NazaraSignal(OnTextAreaKeyUp, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
NazaraSignal(OnTextAreaKeyUp, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
|
||||||
|
NazaraSignal(OnTextChanged, const TextAreaWidget* /*textArea*/, const Nz::String& /*text*/);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Layout() override;
|
void Layout() override;
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,7 @@ namespace Ndk
|
||||||
inline void TextAreaWidget::SetText(const Nz::String& text)
|
inline void TextAreaWidget::SetText(const Nz::String& text)
|
||||||
{
|
{
|
||||||
m_text = text;
|
m_text = text;
|
||||||
|
OnTextChanged(this, m_text);
|
||||||
|
|
||||||
UpdateDisplayText();
|
UpdateDisplayText();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,8 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
|
|
||||||
m_textSprite->Update(m_drawer);
|
m_textSprite->Update(m_drawer);
|
||||||
|
|
||||||
|
OnTextChanged(this, m_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t TextAreaWidget::GetHoveredGlyph(float x, float y) const
|
std::size_t TextAreaWidget::GetHoveredGlyph(float x, float y) const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue