Beispiel #1
0
 private void OnGUI()
 {
     if (ShowAdditionalInfo && !AtLeastOneEnabled)
     {
         GUILayoutExtensions.Vertical(() =>
         {
             GUILayoutExtensions.LabelWithSpace(string.Format("Press {0} key to switch between debug GUI's...", SwitchKey.ToString()));
         });
     }
 }
Beispiel #2
0
        private void OnGUI()
        {
            if (GUISkin != null)
            {
                var labelBoldStyle = GUI.skin.FindStyle("label_bold");
                var labelStyle     = GUI.skin.FindStyle("label");
                var labelImage     = GUI.skin.FindStyle("label_image");

                if (labelBoldStyle != null)
                {
                    BoldLabelStyle = labelBoldStyle;
                }
                else if (labelStyle != null)
                {
                    BoldLabelStyle = labelStyle;
                }

                if (labelImage != null)
                {
                    ImageLabelStyle = labelImage;
                }
                else if (labelStyle != null)
                {
                    ImageLabelStyle = labelStyle;
                }
            }

            if (ShowAdditionalInfo && !AtLeastOneEnabled)
            {
                GUILayoutExtensions.Vertical(() =>
                {
                    GUILayoutExtensions.LabelWithSpace(string.Format("Press {0} key to switch between debug GUI's...", SwitchKey.ToString()));
                    GUILayoutExtensions.LabelWithSpace(string.Format("Mouse Position: {0}", Input.mousePosition));
                });
            }
        }