All gui-elements now use "SColor" instead of "const SColor&" to unify interfaces somewhat (it doesn't really matter which way it's done - the only bad solution is doing it different in every second function). I don't dare changing the one occurrence of "const SColor&" in IGUISkin as skins are so often overloaded and so changing that would break too much user-code, will do that once IGUISkin is more seriously reworked. Sorry for anyone already overloading gui-elements IGUIEditBox, IGUIListBox, IGUIStaticText - you will have to change that as well. But I think in the long run it's better having this at least a little less inconsistent.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3941 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2011-10-11 17:35:47 +00:00
parent cbdbf04487
commit 86c043ea52
6 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ namespace gui
virtual void setOverrideColor(video::SColor color) = 0;
//! Gets the override color
virtual video::SColor const & getOverrideColor() const = 0;
virtual video::SColor getOverrideColor() const = 0;
//! Sets if the text should use the override color or the color in the gui skin.
/** \param enable: If set to true, the override color, which can be set

View File

@ -89,10 +89,10 @@ namespace gui
virtual bool isAutoScrollEnabled() const = 0;
//! set all item colors at given index to color
virtual void setItemOverrideColor(u32 index, const video::SColor &color) = 0;
virtual void setItemOverrideColor(u32 index, video::SColor color) = 0;
//! set all item colors of specified type at given index to color
virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, const video::SColor &color) = 0;
virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) = 0;
//! clear all item colors at index
virtual void clearItemOverrideColor(u32 index) = 0;

View File

@ -115,7 +115,7 @@ void CGUIEditBox::setOverrideColor(video::SColor color)
}
video::SColor const& CGUIEditBox::getOverrideColor() const
video::SColor CGUIEditBox::getOverrideColor() const
{
return OverrideColor;
}

View File

@ -43,7 +43,7 @@ namespace gui
virtual void setOverrideColor(video::SColor color);
//! Gets the override color
virtual video::SColor const & getOverrideColor() const;
virtual video::SColor getOverrideColor() const;
//! Sets if the text should use the overide color or the
//! color in the gui skin.

View File

@ -811,7 +811,7 @@ void CGUIListBox::swapItems(u32 index1, u32 index2)
}
void CGUIListBox::setItemOverrideColor(u32 index, const video::SColor &color)
void CGUIListBox::setItemOverrideColor(u32 index, video::SColor color)
{
for ( u32 c=0; c < EGUI_LBC_COUNT; ++c )
{
@ -821,7 +821,7 @@ void CGUIListBox::setItemOverrideColor(u32 index, const video::SColor &color)
}
void CGUIListBox::setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, const video::SColor &color)
void CGUIListBox::setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color)
{
if ( index >= Items.size() || colorType < 0 || colorType >= EGUI_LBC_COUNT )
return;

View File

@ -95,10 +95,10 @@ namespace gui
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
//! set all item colors at given index to color
virtual void setItemOverrideColor(u32 index, const video::SColor &color);
virtual void setItemOverrideColor(u32 index, video::SColor color);
//! set all item colors of specified type at given index to color
virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, const video::SColor &color);
virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color);
//! clear all item colors at index
virtual void clearItemOverrideColor(u32 index);