SDK/TextAreaWidget: Add Clear() method

This commit is contained in:
Lynix 2016-12-05 15:21:47 +01:00
parent d6e02d486b
commit e3e254532d
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,8 @@ namespace Ndk
void AppendText(const Nz::String& text);
inline void Clear();
//virtual TextAreaWidget* Clone() const = 0;
std::size_t GetHoveredGlyph(float x, float y) const;

View File

@ -6,4 +6,12 @@
namespace Ndk
{
inline void TextAreaWidget::Clear()
{
m_cursorPosition = 0;
m_drawer.Clear();
m_textSprite->Update(m_drawer);
RefreshCursor();
}
}