1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Fix usage of fillRect.

* proper fix for slider drawing
This commit is contained in:
AlexVinS
2014-07-05 01:46:55 +04:00
parent e70e68a56b
commit 0edd10078f
5 changed files with 9 additions and 15 deletions

View File

@ -850,22 +850,10 @@ void CSlider::setAmount( int to )
void CSlider::showAll(SDL_Surface * to)
{
CSDL_Ext::fillRect(to, &pos, 0);
CSDL_Ext::fillRectBlack(to, &pos);
CIntObject::showAll(to);
}
void CSlider::show(SDL_Surface * to)
{
//todo: find better solution for background glitches.
#ifdef VCMI_SDL1
CIntObject::show(to);
#else
CSDL_Ext::fillRect(to, &pos, 0);
CIntObject::showAll(to);
#endif // VCMI_SDL1
}
void CSlider::wheelScrolled(bool down, bool in)
{
moveTo(value + 3 * (down ? +scrollStep : -scrollStep));