Add a hue selector widget.

This commit is contained in:
Paul Chote
2013-04-26 23:06:23 +12:00
parent 2c0b7d2111
commit e240b9ca3d
3 changed files with 65 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ namespace OpenRA.Widgets
}
float ValueFromPx(int x) { return MinimumValue + (MaximumValue - MinimumValue) * (1f * x / RenderBounds.Width); }
int PxFromValue(float x) { return (int)(RenderBounds.Width * (x - MinimumValue) / (MaximumValue - MinimumValue)); }
protected int PxFromValue(float x) { return (int)(RenderBounds.Width * (x - MinimumValue) / (MaximumValue - MinimumValue)); }
public override Widget Clone() { return new SliderWidget(this); }