Beispiel #1
0
 public static void DrawCenteredText(string msg)
 {
     GUIHelper.Setup();
     GUILayout.BeginHorizontal();
     GUILayout.FlexibleSpace();
     GUILayout.Label(msg, GUIHelper.centerAlignedLabel, new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
 }
Beispiel #2
0
 public static void DrawRow(string key, string value)
 {
     GUIHelper.Setup();
     GUILayout.BeginHorizontal();
     GUILayout.Label(key);
     GUILayout.FlexibleSpace();
     GUILayout.Label(value, GUIHelper.rightAlignedLabel, new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
 }
Beispiel #3
0
 public static void DrawArea(Rect area, bool drawHeader, System.Action action)
 {
     GUIHelper.Setup();
     GUI.Box(area, string.Empty);
     GUILayout.BeginArea(area);
     if (drawHeader)
     {
         GUIHelper.DrawCenteredText(SampleSelector.SelectedSample.DisplayName);
         GUILayout.Space(5f);
     }
     if (action != null)
     {
         action();
     }
     GUILayout.EndArea();
 }