Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1.         public static void DrawTextOutline(Vector2 position, string text, Color outColor, Color inColor, int fontSize)
  2.         {
  3.             GUIStyle espLabelStyle = new GUIStyle
  4.             {
  5.                 fontSize = fontSize,
  6.             };
  7.  
  8.             Vector2 vector = espLabelStyle.CalcSize(new GUIContent(text));
  9.             var rect = new Rect(position.x + 1f, position.y + 1f, vector.x + 12f, vector.y + 12f);
  10.             espLabelStyle.normal.textColor = outColor;
  11.             GUI.Label(rect, text, espLabelStyle);
  12.             rect.x -= 1f;
  13.             rect.y -= 1f;
  14.             espLabelStyle.normal.textColor = inColor;
  15.             GUI.Label(rect, text, espLabelStyle);
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement