TextAreaWidget: Make Tab writable (#175)
* TextAreaWidget: Make Tab writable * Implement Tab ena/disabling, disable it by default * Log change * Rename Tab Enabling function * Add useful Write/Delete functions * Finished! * whoops * Fix everything * whoops * I don't know why but it works * whoops * I'M PUSHING.
This commit is contained in:
@@ -23,6 +23,16 @@ namespace Ndk
|
||||
m_multiLineEnabled = enable;
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::EnableTabWriting(bool enable)
|
||||
{
|
||||
m_tabEnabled = enable;
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::Erase(std::size_t glyphPosition)
|
||||
{
|
||||
Erase(glyphPosition, glyphPosition + 1U);
|
||||
}
|
||||
|
||||
inline TextAreaWidget::CharacterFilter TextAreaWidget::GetCharacterFilter() const
|
||||
{
|
||||
return m_characterFilter;
|
||||
@@ -102,6 +112,11 @@ namespace Ndk
|
||||
return m_multiLineEnabled;
|
||||
}
|
||||
|
||||
inline bool TextAreaWidget::IsTabWritingEnabled() const
|
||||
{
|
||||
return m_tabEnabled;
|
||||
}
|
||||
|
||||
inline bool TextAreaWidget::IsReadOnly() const
|
||||
{
|
||||
return m_readOnly;
|
||||
@@ -233,4 +248,14 @@ namespace Ndk
|
||||
|
||||
m_textSprite->Update(m_drawer);
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::Write(const Nz::String& text)
|
||||
{
|
||||
Write(text, GetGlyphIndex(m_cursorPositionBegin));
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition)
|
||||
{
|
||||
Write(text, GetGlyphIndex(glyphPosition));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user