mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
* improved slider
* fixed leaving battles
This commit is contained in:
@@ -476,7 +476,14 @@ template<typename T>
|
||||
void CSlider<T>::clickLeft (tribool down)
|
||||
{
|
||||
if(down)
|
||||
{
|
||||
float pw = LOCPLINT->current->motion.x-pos.x-16;
|
||||
float rw = pw / ((float)(pos.w-32));
|
||||
if (rw>1) rw=1;
|
||||
if (rw<0) rw=0;
|
||||
moveTo(rw*amount);
|
||||
return;
|
||||
}
|
||||
if(moving)
|
||||
{
|
||||
MotionInterested::deactivate();
|
||||
|
||||
Reference in New Issue
Block a user