public void DrawText(string text, TextStyleSetting style, Color color, bool override_color = true) { if (skin.drawWidgets) { BeginSample("DrawText"); Pool <LocText> .Entry entry = textWidgets.Draw(currentPos); LocText widget = entry.widget; Color color2 = Color.white; if ((UnityEngine.Object)widget.textStyleSetting != (UnityEngine.Object)style) { widget.textStyleSetting = style; widget.ApplySettings(); } if ((UnityEngine.Object)style != (UnityEngine.Object)null) { color2 = style.textColor; } if (override_color) { color2 = color; } widget.color = color2; if (widget.text != text) { widget.text = text; widget.KForceUpdateDirty(); } currentPos.x += widget.renderedWidth; maxShadowX = Mathf.Max(currentPos.x, maxShadowX); minLineHeight = (int)Mathf.Max((float)minLineHeight, widget.renderedHeight); EndSample(); } }