SDK/TextAreaWidget: Add TextOutline property
This commit is contained in:
@@ -49,6 +49,8 @@ namespace Ndk
|
||||
inline std::size_t GetGlyphIndex(const Nz::Vector2ui& cursorPosition);
|
||||
inline const Nz::String& GetText() const;
|
||||
inline const Nz::Color& GetTextColor() const;
|
||||
inline const Nz::Color& GetTextOulineColor() const;
|
||||
inline float GetTextOulineThickness() const;
|
||||
|
||||
Nz::Vector2ui GetHoveredGlyph(float x, float y) const;
|
||||
|
||||
@@ -70,6 +72,8 @@ namespace Ndk
|
||||
inline void SetSelection(Nz::Vector2ui fromPosition, Nz::Vector2ui toPosition);
|
||||
inline void SetText(const Nz::String& text);
|
||||
inline void SetTextColor(const Nz::Color& text);
|
||||
inline void SetTextOutlineColor(const Nz::Color& color);
|
||||
inline void SetTextOutlineThickness(float thickness);
|
||||
|
||||
inline void Write(const Nz::String& text);
|
||||
inline void Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition);
|
||||
|
||||
@@ -102,6 +102,16 @@ namespace Ndk
|
||||
return m_drawer.GetColor();
|
||||
}
|
||||
|
||||
inline const Nz::Color& TextAreaWidget::GetTextOulineColor() const
|
||||
{
|
||||
return m_drawer.GetOutlineColor();
|
||||
}
|
||||
|
||||
inline float TextAreaWidget::GetTextOulineThickness() const
|
||||
{
|
||||
return m_drawer.GetOutlineThickness();
|
||||
}
|
||||
|
||||
inline bool TextAreaWidget::HasSelection() const
|
||||
{
|
||||
return m_cursorPositionBegin != m_cursorPositionEnd;
|
||||
@@ -241,7 +251,21 @@ namespace Ndk
|
||||
{
|
||||
m_drawer.SetColor(text);
|
||||
|
||||
m_textSprite->Update(m_drawer);
|
||||
UpdateDisplayText();
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::SetTextOutlineColor(const Nz::Color& color)
|
||||
{
|
||||
m_drawer.SetOutlineColor(color);
|
||||
|
||||
UpdateDisplayText();
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::SetTextOutlineThickness(float thickness)
|
||||
{
|
||||
m_drawer.SetOutlineThickness(thickness);
|
||||
|
||||
UpdateDisplayText();
|
||||
}
|
||||
|
||||
inline void TextAreaWidget::Write(const Nz::String& text)
|
||||
|
||||
Reference in New Issue
Block a user