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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user