Commit e03bb492 authored by cutealien's avatar cutealien

Add getBackgroundColor, isDrawBackgroundEnabled and isDrawBorderEnabled to...

Add getBackgroundColor, isDrawBackgroundEnabled and isDrawBorderEnabled to IGUIStaticText (thx 4 patch from Nalin).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3939 dfc29bdd-3216-0410-991c-e03cc46cb475
parent e6a6ff08
...@@ -49,7 +49,7 @@ namespace gui ...@@ -49,7 +49,7 @@ namespace gui
//! Gets the override color //! Gets the override color
/** \return: The override color */ /** \return: The override color */
virtual video::SColor const& getOverrideColor(void) const = 0; virtual video::SColor getOverrideColor(void) const = 0;
//! Sets if the static text should use the overide color or the color in the gui skin. //! Sets if the static text should use the overide color or the color in the gui skin.
/** \param enable: If set to true, the override color, which can be set /** \param enable: If set to true, the override color, which can be set
...@@ -67,9 +67,21 @@ namespace gui ...@@ -67,9 +67,21 @@ namespace gui
//! Sets whether to draw the background //! Sets whether to draw the background
virtual void setDrawBackground(bool draw) = 0; virtual void setDrawBackground(bool draw) = 0;
//! Gets the background color
/** \return: The background color */
virtual video::SColor const& getBackgroundColor() const = 0;
//! Checks if background drawing is enabled
/** \return true if background drawing is enabled, false otherwise */
virtual bool isDrawBackgroundEnabled() const = 0;
//! Sets whether to draw the border //! Sets whether to draw the border
virtual void setDrawBorder(bool draw) = 0; virtual void setDrawBorder(bool draw) = 0;
//! Checks if border drawing is enabled
/** \return true if border drawing is enabled, false otherwise */
virtual bool isDrawBorderEnabled() const = 0;
//! Sets text justification mode //! Sets text justification mode
/** \param horizontal: EGUIA_UPPERLEFT for left justified (default), /** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text. EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
......
...@@ -201,6 +201,21 @@ void CGUIStaticText::setDrawBackground(bool draw) ...@@ -201,6 +201,21 @@ void CGUIStaticText::setDrawBackground(bool draw)
} }
//! Gets the background color
video::SColor const& CGUIStaticText::getBackgroundColor() const
{
return BGColor;
}
//! Checks if background drawing is enabled
bool CGUIStaticText::isDrawBackgroundEnabled() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return Background;
}
//! Sets whether to draw the border //! Sets whether to draw the border
void CGUIStaticText::setDrawBorder(bool draw) void CGUIStaticText::setDrawBorder(bool draw)
{ {
...@@ -208,6 +223,14 @@ void CGUIStaticText::setDrawBorder(bool draw) ...@@ -208,6 +223,14 @@ void CGUIStaticText::setDrawBorder(bool draw)
} }
//! Checks if border drawing is enabled
bool CGUIStaticText::isDrawBorderEnabled() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return Border;
}
void CGUIStaticText::setTextRestrainedInside(bool restrainTextInside) void CGUIStaticText::setTextRestrainedInside(bool restrainTextInside)
{ {
RestrainTextInside = restrainTextInside; RestrainTextInside = restrainTextInside;
...@@ -227,7 +250,7 @@ void CGUIStaticText::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT ...@@ -227,7 +250,7 @@ void CGUIStaticText::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT
} }
video::SColor const& CGUIStaticText::getOverrideColor() const video::SColor CGUIStaticText::getOverrideColor() const
{ {
return OverrideColor; return OverrideColor;
} }
......
...@@ -48,14 +48,23 @@ namespace gui ...@@ -48,14 +48,23 @@ namespace gui
//! Sets whether to draw the background //! Sets whether to draw the background
virtual void setDrawBackground(bool draw); virtual void setDrawBackground(bool draw);
//! Gets the background color
virtual video::SColor const& getBackgroundColor() const;
//! Checks if background drawing is enabled
virtual bool isDrawBackgroundEnabled() const;
//! Sets whether to draw the border //! Sets whether to draw the border
virtual void setDrawBorder(bool draw); virtual void setDrawBorder(bool draw);
//! Checks if border drawing is enabled
virtual bool isDrawBorderEnabled() const;
//! Sets alignment mode for text //! Sets alignment mode for text
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical); virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical);
//! Gets the override color //! Gets the override color
virtual video::SColor const & getOverrideColor() const; virtual video::SColor getOverrideColor() const;
//! Sets if the static text should use the overide color or the //! Sets if the static text should use the overide color or the
//! color in the gui skin. //! color in the gui skin.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment