コード例 #1
0
        protected override float GetHeight(float width, GUIContent label)
        {
            var height = LudiqGUIUtility.GetHelpBoxHeight(message, MessageType.Warning, width);

            height += EditorGUIUtility.standardVerticalSpacing;
            return(height);
        }
コード例 #2
0
        private float GetBackgroundEmbedWarningHeight(float width)
        {
            var fixContent = new GUIContent("Fix");

            var fixButtonWidth = Styles.fixBackgroundEmbedButton.CalcSize(fixContent).x - (Styles.spaceBeforeButton / 2);
            var warningWidth   = width - fixButtonWidth - (Styles.spaceBeforeButton / 2);
            var warningHeight  = LudiqGUIUtility.GetHelpBoxHeight(BackgroundEmbedWarning, MessageType.Warning, warningWidth);

            return(warningHeight);
        }
コード例 #3
0
        private void OnBackgroundEmbedWarningGUI(Rect position, ref float y)
        {
            var fixContent = new GUIContent("Fix");

            var fixButtonWidth = Styles.fixBackgroundEmbedButton.CalcSize(fixContent).x - (Styles.spaceBeforeButton / 2);
            var warningWidth   = position.width - fixButtonWidth - (Styles.spaceBeforeButton / 2);
            var warningHeight  = LudiqGUIUtility.GetHelpBoxHeight(BackgroundEmbedWarning, MessageType.Warning, warningWidth);

            var warningPosition = new Rect
                                  (
                position.x,
                y,
                warningWidth,
                warningHeight
                                  );

            var fixButtonPosition = new Rect
                                    (
                warningPosition.xMax + Styles.spaceBeforeButton,
                y,
                fixButtonWidth,
                warningHeight
                                    );

            EditorGUI.HelpBox(warningPosition, BackgroundEmbedWarning, MessageType.Warning);

            if (GUI.Button(fixButtonPosition, fixContent))
            {
                if (EditorUtility.DisplayDialog("Background Embed Graph", "A background embed graph has been detected on this nest. This may cause slowdowns on serialization operations and unfixable background warnings. Do you want to delete the embed graph?", "Delete", "Cancel"))
                {
                    metadata.RecordUndo();
                    embedGraphMetadata.value = null;
                }
            }

            y += warningPosition.height;
        }
コード例 #4
0
 private float GetNoGraphSelectedHeight(float width)
 {
     return(LudiqGUIUtility.GetHelpBoxHeight(NoGraphSelectedMessage, MessageType.Info, width));
 }
コード例 #5
0
 private float GetNoMultiEditHeight(float width)
 {
     return(LudiqGUIUtility.GetHelpBoxHeight(NoMultiEditMessage, MessageType.Info, width));
 }
コード例 #6
0
 protected float GetExceptionHeight(float width)
 {
     return(LudiqGUIUtility.GetHelpBoxHeight(exceptionMessage, MessageType.Error, width));
 }
コード例 #7
0
ファイル: Warning.cs プロジェクト: hyop30/Platformer-Loglike
 public float GetHeight(float width)
 {
     return(LudiqGUIUtility.GetHelpBoxHeight(message, messageType, width));
 }
コード例 #8
0
 private float GetComponentPrefabWarningHeight(float width)
 {
     return(LudiqGUIUtility.GetHelpBoxHeight(ComponentPrefabWarning, MessageType.Warning, width));
 }