Esempio n. 1
0
 private static IconLabelWindow BaseInit(string iconName, string label, int fontSize, Color contentColor, Vector2 size,
                                         Vector2?position = null, Action <int> onCloseEvent = null)
 {
     m_instance                = GetWindow <IconLabelWindow>();
     m_instance.m_label        = label;
     m_instance.m_fontSize     = fontSize;
     m_instance.m_contentColor = contentColor;
     m_instance.titleContent   = MightyGUIUtilities.DrawIcon(iconName);
     m_instance.maxSize        = m_instance.minSize = size;
     m_instance.maximized      = false;
     if (position != null)
     {
         m_instance.position = new Rect((Vector2)position, size);
     }
     m_instance.m_onCloseEvent = onCloseEvent;
     m_instance.Show();
     return(m_instance);
 }
Esempio n. 2
0
 public static void CloseWindow(IconLabelWindow instance) => CloseWindow(instance.GetInstanceID());
Esempio n. 3
0
 public static void AddExtraDraw(IconLabelWindow instance, Action extraDrawAction) =>
 AddExtraDraw(instance.GetInstanceID(), extraDrawAction);