/** * Draw label with potential dropshadow */ public override void Draw() { SmartUI.Color = Color; if (EnableBackground) { SmartUI.Draw(Bounds, Style); } SmartUI.Color = Color.white; if (FauxEdge) { // SmartUI has quite slow shadowing as it has to go in an modify all the color codes. So I use my own cached one here. SmartUI.Text(ContentsBounds.Translated(new Vector2(ShadowDistance, ShadowDistance)), shadowCaption, Style); SmartUI.Text(ContentsBounds.Translated(new Vector2(-ShadowDistance, ShadowDistance)), shadowCaption, Style); SmartUI.Text(ContentsBounds.Translated(new Vector2(-ShadowDistance, -ShadowDistance)), shadowCaption, Style); SmartUI.Text(ContentsBounds.Translated(new Vector2(ShadowDistance, -ShadowDistance)), shadowCaption, Style); SmartUI.Text(ContentsBounds, colorisedCaption, Style); } else if (DropShadow) { // SmartUI has quite slow shadowing as it has to go in an modify all the color codes. So I use my own cached one here. SmartUI.Text(ContentsBounds.Translated(new Vector2(ShadowDistance, ShadowDistance)), shadowCaption, Style); SmartUI.Text(ContentsBounds, colorisedCaption, Style); } else { SmartUI.Text(ContentsBounds, colorisedCaption, Style); } SmartUI.Color = Color.white; }