mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 15:50:27 +02:00
Merging r6145 through r6171 from trunk to ogl-es branch
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6172 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -99,8 +99,8 @@ void CGUIStaticText::draw()
|
||||
font->getDimension(Text.c_str()).Width;
|
||||
}
|
||||
|
||||
font->draw(Text.c_str(), frameRect,
|
||||
OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT),
|
||||
font->draw(Text.c_str(), frameRect,
|
||||
getActiveColor(),
|
||||
HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER, (RestrainTextInside ? &AbsoluteClippingRect : NULL));
|
||||
}
|
||||
else
|
||||
@ -129,7 +129,7 @@ void CGUIStaticText::draw()
|
||||
}
|
||||
|
||||
font->draw(BrokenText[i].c_str(), r,
|
||||
OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT),
|
||||
getActiveColor(),
|
||||
HAlign == EGUIA_CENTER, false, (RestrainTextInside ? &AbsoluteClippingRect : NULL));
|
||||
|
||||
r.LowerRightCorner.Y += height;
|
||||
@ -254,6 +254,16 @@ video::SColor CGUIStaticText::getOverrideColor() const
|
||||
}
|
||||
|
||||
|
||||
irr::video::SColor CGUIStaticText::getActiveColor() const
|
||||
{
|
||||
if ( OverrideColorEnabled )
|
||||
return OverrideColor;
|
||||
IGUISkin* skin = Environment->getSkin();
|
||||
if (skin)
|
||||
return OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT);
|
||||
return OverrideColor;
|
||||
}
|
||||
|
||||
//! Sets if the static text should use the override color or the
|
||||
//! color in the gui skin.
|
||||
void CGUIStaticText::enableOverrideColor(bool enable)
|
||||
|
Reference in New Issue
Block a user