Sdk/TextAreaWidget: Add OnTextChanged signal

This commit is contained in:
Jérôme Leclercq 2017-11-10 13:13:33 +01:00
parent bb6e032b60
commit e3f21b7268
4 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ Nazara Development Kit:
- Fix World movement which could cause crashes when updating systems
- Fix crash occuring sometimes on keyboard event
- Add support for EchoMode to TextAreaWidget (which allows to setup password text area)
- Add signal OnTextChanged to TextAreaWidget
# 0.4:

View File

@ -68,6 +68,7 @@ namespace Ndk
NazaraSignal(OnTextAreaKeyReturn, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
NazaraSignal(OnTextAreaKeyRight, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
NazaraSignal(OnTextAreaKeyUp, const TextAreaWidget* /*textArea*/, bool* /*ignoreDefaultAction*/);
NazaraSignal(OnTextChanged, const TextAreaWidget* /*textArea*/, const Nz::String& /*text*/);
private:
void Layout() override;

View File

@ -172,6 +172,7 @@ namespace Ndk
inline void TextAreaWidget::SetText(const Nz::String& text)
{
m_text = text;
OnTextChanged(this, m_text);
UpdateDisplayText();
}

View File

@ -69,6 +69,8 @@ namespace Ndk
}
m_textSprite->Update(m_drawer);
OnTextChanged(this, m_text);
}
std::size_t TextAreaWidget::GetHoveredGlyph(float x, float y) const