/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.Base skin) { if (ShouldDrawBackground) { skin.DrawButton(this, true, false, IsDisabled); } }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.Base skin) { base.Render(skin); if (ShouldDrawBackground) { bool drawDepressed = IsDepressed && IsHovered; if (IsToggle) { drawDepressed = drawDepressed || ToggleState; } bool bDrawHovered = IsHovered && ShouldDrawHover; skin.DrawButton(this, drawDepressed, bDrawHovered, IsDisabled); } }