Clamp, scroll, scrollspeed, sliders
Reduced clamp duplication Fixed scrolling speed issue Modified scrollspeed slider to use a range Fixed scrollspeed, volume, and sound sliders not showing current setting.
This commit is contained in:
committed by
Chris Forbes
parent
ab431fe9ee
commit
c85503811c
@@ -33,15 +33,5 @@ namespace OpenRA.Server
|
||||
{
|
||||
return ts.Except( new[] { t } );
|
||||
}
|
||||
|
||||
public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
|
||||
{
|
||||
if (val.CompareTo(min) < 0)
|
||||
return min;
|
||||
else if (val.CompareTo(max) > 0)
|
||||
return max;
|
||||
else
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user