1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

* no more divison by 0 in slider

* little more code for upgrades 
* version set to 0.6
* "plural" reference names for Conflux creatures (starting armies of Conflux heroes should now be working)
* minor changes
This commit is contained in:
Michał W. Urbańczyk
2008-05-31 20:37:54 +00:00
parent 88a29416da
commit 7d7abbb68d
14 changed files with 205 additions and 35 deletions

View File

@ -183,9 +183,14 @@ void CSlider::moveTo(int to)
else if(to>amount)
to=amount;
value = to;
float part = (float)to/amount;
part*=(pos.w-48);
slider.pos.x = part + pos.x + 16;
if(amount)
{
float part = (float)to/amount;
part*=(pos.w-48);
slider.pos.x = part + pos.x + 16;
}
else
slider.pos.x = pos.x+16;
moved(to);
}