SDK/TextAreaWidget: Add TextOutline property
This commit is contained in:
parent
dcfd2ad8f9
commit
29718db085
|
|
@ -265,6 +265,7 @@ Nazara Development Kit:
|
||||||
- Added LifetimeComponent and LifetimeSystem
|
- Added LifetimeComponent and LifetimeSystem
|
||||||
- Fixed a subtle bug regarding entities invalidation and kill (ex: if an entity #2 kills entity #1 during Entity::Destroy callbacks, entity #1 will survive destruction).
|
- Fixed a subtle bug regarding entities invalidation and kill (ex: if an entity #2 kills entity #1 during Entity::Destroy callbacks, entity #1 will survive destruction).
|
||||||
- Added PhysicsSystem2D::[RaycastQuery, RegionQuery] overloads taking a callback
|
- Added PhysicsSystem2D::[RaycastQuery, RegionQuery] overloads taking a callback
|
||||||
|
- Added TextAreaWidget support for outline
|
||||||
|
|
||||||
# 0.4:
|
# 0.4:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ namespace Ndk
|
||||||
inline std::size_t GetGlyphIndex(const Nz::Vector2ui& cursorPosition);
|
inline std::size_t GetGlyphIndex(const Nz::Vector2ui& cursorPosition);
|
||||||
inline const Nz::String& GetText() const;
|
inline const Nz::String& GetText() const;
|
||||||
inline const Nz::Color& GetTextColor() 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;
|
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 SetSelection(Nz::Vector2ui fromPosition, Nz::Vector2ui toPosition);
|
||||||
inline void SetText(const Nz::String& text);
|
inline void SetText(const Nz::String& text);
|
||||||
inline void SetTextColor(const Nz::Color& 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);
|
||||||
inline void Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition);
|
inline void Write(const Nz::String& text, const Nz::Vector2ui& glyphPosition);
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,16 @@ namespace Ndk
|
||||||
return m_drawer.GetColor();
|
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
|
inline bool TextAreaWidget::HasSelection() const
|
||||||
{
|
{
|
||||||
return m_cursorPositionBegin != m_cursorPositionEnd;
|
return m_cursorPositionBegin != m_cursorPositionEnd;
|
||||||
|
|
@ -241,7 +251,21 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
m_drawer.SetColor(text);
|
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)
|
inline void TextAreaWidget::Write(const Nz::String& text)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue