SDK/TextAreaWidget: Add Clear() method
This commit is contained in:
@@ -26,6 +26,8 @@ namespace Ndk
|
|||||||
|
|
||||||
void AppendText(const Nz::String& text);
|
void AppendText(const Nz::String& text);
|
||||||
|
|
||||||
|
inline void Clear();
|
||||||
|
|
||||||
//virtual TextAreaWidget* Clone() const = 0;
|
//virtual TextAreaWidget* Clone() const = 0;
|
||||||
|
|
||||||
std::size_t GetHoveredGlyph(float x, float y) const;
|
std::size_t GetHoveredGlyph(float x, float y) const;
|
||||||
|
|||||||
@@ -6,4 +6,12 @@
|
|||||||
|
|
||||||
namespace Ndk
|
namespace Ndk
|
||||||
{
|
{
|
||||||
|
inline void TextAreaWidget::Clear()
|
||||||
|
{
|
||||||
|
m_cursorPosition = 0;
|
||||||
|
m_drawer.Clear();
|
||||||
|
m_textSprite->Update(m_drawer);
|
||||||
|
|
||||||
|
RefreshCursor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user