Applied nathanm's patch (#343). Thanks a lot!
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9368 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
60c0aa5616
commit
0edd32e8dd
@ -1397,52 +1397,26 @@ void Skin::drawScrollbarThumb(const irr::core::rect< irr::s32 > &rect)
|
||||
void Skin::drawScrollbarButton(const irr::core::rect< irr::s32 > &rect, const bool pressed,
|
||||
const bool bottomArrow)
|
||||
{
|
||||
BoxRenderParams& p = (pressed)
|
||||
? SkinConfig::m_render_params["scrollbar_button::down"]
|
||||
: SkinConfig::m_render_params["scrollbar_button::neutral"];
|
||||
|
||||
if (pressed)
|
||||
if (!bottomArrow)
|
||||
{
|
||||
BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_button::down"];
|
||||
|
||||
if (!bottomArrow)
|
||||
{
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.m_source_area_center,
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
else
|
||||
{
|
||||
// flip image
|
||||
const irr::core::rect<irr::s32>& source_area = p.m_source_area_center;
|
||||
const int x0 = source_area.UpperLeftCorner.X;
|
||||
const int x1 = source_area.LowerRightCorner.X;
|
||||
const int y0 = source_area.UpperLeftCorner.Y;
|
||||
const int y1 = source_area.LowerRightCorner.Y;
|
||||
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, core::rect<irr::s32>(x0, y1, x1, y0),
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
//drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_background::down"]);
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.m_source_area_center,
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
else
|
||||
{
|
||||
BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_button::neutral"];
|
||||
|
||||
if (!bottomArrow)
|
||||
{
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.m_source_area_center,
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
else
|
||||
{
|
||||
// flip image
|
||||
const irr::core::rect<irr::s32>& source_area = p.m_source_area_center;
|
||||
const int x0 = source_area.UpperLeftCorner.X;
|
||||
const int x1 = source_area.LowerRightCorner.X;
|
||||
const int y0 = source_area.UpperLeftCorner.Y;
|
||||
const int y1 = source_area.LowerRightCorner.Y;
|
||||
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, core::rect<irr::s32>(x0, y1, x1, y0),
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
//drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_background::neutral"]);
|
||||
// flip image
|
||||
const irr::core::rect<irr::s32>& source_area = p.m_source_area_center;
|
||||
const int x0 = source_area.UpperLeftCorner.X;
|
||||
const int x1 = source_area.LowerRightCorner.X;
|
||||
const int y0 = source_area.UpperLeftCorner.Y;
|
||||
const int y1 = source_area.LowerRightCorner.Y;
|
||||
|
||||
GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, core::rect<irr::s32>(x0, y1, x1, y0),
|
||||
0 /* no clipping */, 0, true /* alpha */);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user