public void Render(IRenderContext renderContext, Rectangle layout, Label label) { _renderUtilities.RenderText( renderContext, _layoutPosition.GetPositionInLayout(layout, label.HorizontalAlignment ?? HorizontalAlignment.Center, label.VerticalAlignment ?? VerticalAlignment.Center), label.Text, label.Font ?? _fontAsset, label.HorizontalAlignment ?? HorizontalAlignment.Center, label.VerticalAlignment ?? VerticalAlignment.Center, label.TextColor, label.RenderShadow ?? true, label.ShadowColor); }
public void Render(IRenderContext renderContext, Rectangle layout, Label label) { var textColor = label.TextColor ?? Color.Black; if (label.AttachTo != null) { if (label.AttachTo.Focused) { textColor = new Color(2, 141, 31, 255); } } _renderUtilities.RenderText( renderContext, _layoutPosition.GetPositionInLayout(layout, label.HorizontalAlignment ?? HorizontalAlignment.Center, label.VerticalAlignment ?? VerticalAlignment.Center), label.Text, label.Font ?? _fontAsset, label.HorizontalAlignment ?? HorizontalAlignment.Center, label.VerticalAlignment ?? VerticalAlignment.Center, textColor: textColor, renderShadow: false); }