Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Scenes.Tests.Controls.PercentageBarTests
10 unit tests call DeltaEngine.Scenes.Controls.PercentageBar.Value
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: SingleRemarks
Examples
[Test, CloseAfterFirstFrame] public void DefaultValues() { Assert.AreEqual(0, bar.Minimum); Assert.AreEqual(100, bar.Maximum); Assert.AreEqual(100, bar.Value); Assert.AreEqual(Center, bar.DrawArea); Assert.AreEqual(Width, bar.MaxWidth); Assert.AreEqual(HighColor, bar.Color); Assert.AreEqual(PercentileColors, bar.PercentileColors); Assert.AreEqual(PercentageBar.HorizontalAlignment.Left, bar.Alignment); }
[Test, CloseAfterFirstFrame] public void ChangingValueUpdatesDrawArea() { bar.Value = 60; Assert.AreEqual(60, bar.Value); Assert.AreEqual(new Rectangle(Left, Top, 0.6f * Width, Height), bar.DrawArea); }
[Test, CloseAfterFirstFrame] public void ChangingValueToLowValueLerpsColorBetweenFirstPercentileColors() { bar.Value = 30; AssertColorsNearlyEqual(LowColor.Lerp(MidColor, 0.6f), bar.Color); }
See Also