public override void Draw(IGraphicsAdapter pSystem) { //Draw labels var y = Bounds.Top + ((ActualHeight - BarHeight) / 2); pSystem.DrawText(Min.ToString(), new Rectangle(Position.X, y, _labelWidth, ActualHeight), LabelFont); pSystem.DrawText(Max.ToString(), new Rectangle(_barBounds.Right, y, _labelWidth, ActualHeight), LabelFont); //Draw slider pSystem.DrawRect(_barBounds, Bar); pSystem.DrawElipse(_sliderPosition, _sliderRadius, Grip); //Show value if sliding if (_dragging) { pSystem.DrawText(Value.ToString(), new Rectangle(_sliderPosition, _labelWidth, ActualHeight), LabelFont); } }
public override void Draw(IGraphicsAdapter pSystem) { pSystem.DrawRect(Bounds, Background); pSystem.DrawText(Text, Bounds, Font, true); //TODO clip, DrawTextLayout? if (_showCursor && IsFocused) { var s = Font.MeasureString(Text.Substring(0, _cursorPos), ActualWidth); var x = Bounds.Left + s.Width + 1; pSystem.DrawLine(new Vector2(x, Bounds.Top + 1), new Vector2(x, Bounds.Bottom - 1), Cursor); } }
public override void Draw(IGraphicsAdapter pSystem) { pSystem.DrawText(Text, Bounds, Font); }
public override void Draw(IGraphicsAdapter pSystem) { pSystem.DrawText(Label, new Rectangle(Bounds.X, Bounds.Y, LabelWidth, ActualHeight), Font); }