SDK: (Rich)TextAreaWidget now have alterable text styles
This commit is contained in:
parent
ba405aaa5f
commit
453c7a7e77
|
|
@ -308,6 +308,7 @@ Nazara Development Kit:
|
||||||
- Added Entity::DropComponent which detaches a component without necessarily destroying it
|
- Added Entity::DropComponent which detaches a component without necessarily destroying it
|
||||||
- ⚠ ConstraintComponent2D has been reworked to handle entity destruction and remove constraints at will
|
- ⚠ ConstraintComponent2D has been reworked to handle entity destruction and remove constraints at will
|
||||||
- Fixed crash when pressing up/down key with no history in the console
|
- Fixed crash when pressing up/down key with no history in the console
|
||||||
|
- (Rich)TextAreaWidget text style is now alterable
|
||||||
|
|
||||||
# 0.4:
|
# 0.4:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,14 @@ namespace Ndk
|
||||||
inline Nz::Font* GetTextFont() const;
|
inline Nz::Font* GetTextFont() const;
|
||||||
inline const Nz::Color& GetTextOutlineColor() const;
|
inline const Nz::Color& GetTextOutlineColor() const;
|
||||||
inline float GetTextOutlineThickness() const;
|
inline float GetTextOutlineThickness() const;
|
||||||
|
inline Nz::TextStyleFlags GetTextStyle() const;
|
||||||
|
|
||||||
inline void SetCharacterSize(unsigned int characterSize);
|
inline void SetCharacterSize(unsigned int characterSize);
|
||||||
inline void SetTextColor(const Nz::Color& color);
|
inline void SetTextColor(const Nz::Color& color);
|
||||||
inline void SetTextFont(Nz::FontRef font);
|
inline void SetTextFont(Nz::FontRef font);
|
||||||
inline void SetTextOutlineColor(const Nz::Color& color);
|
inline void SetTextOutlineColor(const Nz::Color& color);
|
||||||
inline void SetTextOutlineThickness(float thickness);
|
inline void SetTextOutlineThickness(float thickness);
|
||||||
|
inline void SetTextStyle(Nz::TextStyleFlags style);
|
||||||
|
|
||||||
void Write(const Nz::String& text, std::size_t glyphPosition) override;
|
void Write(const Nz::String& text, std::size_t glyphPosition) override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,11 @@ namespace Ndk
|
||||||
return m_drawer.GetDefaultOutlineThickness();
|
return m_drawer.GetDefaultOutlineThickness();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Nz::TextStyleFlags RichTextAreaWidget::GetTextStyle() const
|
||||||
|
{
|
||||||
|
return m_drawer.GetDefaultStyle();
|
||||||
|
}
|
||||||
|
|
||||||
inline void RichTextAreaWidget::SetCharacterSize(unsigned int characterSize)
|
inline void RichTextAreaWidget::SetCharacterSize(unsigned int characterSize)
|
||||||
{
|
{
|
||||||
m_drawer.SetDefaultCharacterSize(characterSize);
|
m_drawer.SetDefaultCharacterSize(characterSize);
|
||||||
|
|
@ -55,4 +60,9 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
m_drawer.SetDefaultOutlineThickness(thickness);
|
m_drawer.SetDefaultOutlineThickness(thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void RichTextAreaWidget::SetTextStyle(Nz::TextStyleFlags style)
|
||||||
|
{
|
||||||
|
m_drawer.SetDefaultStyle(style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ namespace Ndk
|
||||||
inline Nz::Font* GetTextFont() const;
|
inline Nz::Font* GetTextFont() const;
|
||||||
inline const Nz::Color& GetTextOulineColor() const;
|
inline const Nz::Color& GetTextOulineColor() const;
|
||||||
inline float GetTextOulineThickness() const;
|
inline float GetTextOulineThickness() const;
|
||||||
|
inline Nz::TextStyleFlags GetTextStyle() const;
|
||||||
|
|
||||||
void SetCharacterSize(unsigned int characterSize);
|
void SetCharacterSize(unsigned int characterSize);
|
||||||
inline void SetText(const Nz::String& text);
|
inline void SetText(const Nz::String& text);
|
||||||
|
|
@ -41,6 +42,7 @@ namespace Ndk
|
||||||
inline void SetTextFont(Nz::FontRef font);
|
inline void SetTextFont(Nz::FontRef font);
|
||||||
inline void SetTextOutlineColor(const Nz::Color& color);
|
inline void SetTextOutlineColor(const Nz::Color& color);
|
||||||
inline void SetTextOutlineThickness(float thickness);
|
inline void SetTextOutlineThickness(float thickness);
|
||||||
|
inline void SetTextStyle(Nz::TextStyleFlags style);
|
||||||
|
|
||||||
using AbstractTextAreaWidget::Write;
|
using AbstractTextAreaWidget::Write;
|
||||||
void Write(const Nz::String& text, std::size_t glyphPosition) override;
|
void Write(const Nz::String& text, std::size_t glyphPosition) override;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ namespace Ndk
|
||||||
return m_drawer.GetOutlineThickness();
|
return m_drawer.GetOutlineThickness();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Nz::TextStyleFlags TextAreaWidget::GetTextStyle() const
|
||||||
|
{
|
||||||
|
return m_drawer.GetStyle();
|
||||||
|
}
|
||||||
|
|
||||||
inline void TextAreaWidget::SetText(const Nz::String& text)
|
inline void TextAreaWidget::SetText(const Nz::String& text)
|
||||||
{
|
{
|
||||||
m_text = text;
|
m_text = text;
|
||||||
|
|
@ -76,4 +81,11 @@ namespace Ndk
|
||||||
|
|
||||||
UpdateDisplayText();
|
UpdateDisplayText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void TextAreaWidget::SetTextStyle(Nz::TextStyleFlags style)
|
||||||
|
{
|
||||||
|
m_drawer.SetStyle(style);
|
||||||
|
|
||||||
|
UpdateDisplayText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue