Widgets/TextAreaWidget: Add a way to limit text length
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Nz
|
||||
|
||||
AbstractTextAreaWidget::AbstractTextAreaWidget(BaseWidget* parent) :
|
||||
BaseWidget(parent),
|
||||
m_characterFilter(),
|
||||
m_maximumTextLength(0),
|
||||
m_echoMode(EchoMode::Normal),
|
||||
m_cursorPositionBegin(0U, 0U),
|
||||
m_cursorPositionEnd(0U, 0U),
|
||||
@@ -120,6 +120,11 @@ namespace Nz
|
||||
return Vector2ui::Zero();
|
||||
}
|
||||
|
||||
void AbstractTextAreaWidget::SetMaximumTextLength(std::size_t maximumLength)
|
||||
{
|
||||
m_maximumTextLength = maximumLength;
|
||||
}
|
||||
|
||||
Color AbstractTextAreaWidget::GetCursorColor() const
|
||||
{
|
||||
if (m_cursorPositionBegin == m_cursorPositionEnd)
|
||||
|
||||
Reference in New Issue
Block a user