コード例 #1
0
    /// <summary>
    /// Draws the thin, Unity-style toolbar showing error counts and toggle buttons
    /// </summary>
    void DrawToolbar()
    {
        var toolbarStyle = GUI.skin.customStyles[3];

        GUILayout.BeginHorizontal();
        if (ButtonClamped("Clear", toolbarStyle))
        {
            Clear();
        }
        // PauseOnError  = ToggleClamped(PauseOnError, "Pause On Error", toolbarStyle);
        ShowTimes = ToggleClamped(ShowTimes, "Show Times", toolbarStyle);

        var buttonSize = toolbarStyle.CalcSize(new GUIContent("T")).y;

        GUILayout.FlexibleSpace();

        var showErrors   = ToggleClamped(ShowErrors, new GUIContent(NoErrors.ToString(), SmallErrorIcon), toolbarStyle, GUILayout.Height(buttonSize));
        var showWarnings = ToggleClamped(ShowWarnings, new GUIContent(NoWarnings.ToString(), SmallWarningIcon), toolbarStyle, GUILayout.Height(buttonSize));
        var showMessages = ToggleClamped(ShowMessages, new GUIContent(NoMessages.ToString(), SmallMessageIcon), toolbarStyle, GUILayout.Height(buttonSize));

        //If the errors/warning to show has changed, clear the selected message
        if (showErrors != ShowErrors || showWarnings != ShowWarnings || showMessages != ShowMessages)
        {
            ClearSelectedMessage();
        }
        ShowWarnings = showWarnings;
        ShowMessages = showMessages;
        ShowErrors   = showErrors;
        GUILayout.EndHorizontal();
    }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (BottomConstraint != null)
            {
                BottomConstraint.Dispose();
                BottomConstraint = null;
            }

            if (ChatEditMessage != null)
            {
                ChatEditMessage.Dispose();
                ChatEditMessage = null;
            }

            if (ChatEditMessageContainer != null)
            {
                ChatEditMessageContainer.Dispose();
                ChatEditMessageContainer = null;
            }

            if (ChatMessageWindow != null)
            {
                ChatMessageWindow.Dispose();
                ChatMessageWindow = null;
            }

            if (ChatOneBack != null)
            {
                ChatOneBack.Dispose();
                ChatOneBack = null;
            }

            if (ChatOneLeftConstraint != null)
            {
                ChatOneLeftConstraint.Dispose();
                ChatOneLeftConstraint = null;
            }

            if (ChatOneRightConstraint != null)
            {
                ChatOneRightConstraint.Dispose();
                ChatOneRightConstraint = null;
            }

            if (ChatSendMessage != null)
            {
                ChatSendMessage.Dispose();
                ChatSendMessage = null;
            }

            if (ChatTargetImage != null)
            {
                ChatTargetImage.Dispose();
                ChatTargetImage = null;
            }

            if (ChatViewProfile != null)
            {
                ChatViewProfile.Dispose();
                ChatViewProfile = null;
            }

            if (MatchDate != null)
            {
                MatchDate.Dispose();
                MatchDate = null;
            }

            if (MenuBlock != null)
            {
                MenuBlock.Dispose();
                MenuBlock = null;
            }

            if (MenuContainer != null)
            {
                MenuContainer.Dispose();
                MenuContainer = null;
            }

            if (MenuFriend != null)
            {
                MenuFriend.Dispose();
                MenuFriend = null;
            }

            if (MenuIcon != null)
            {
                MenuIcon.Dispose();
                MenuIcon = null;
            }

            if (MenuLayer != null)
            {
                MenuLayer.Dispose();
                MenuLayer = null;
            }

            if (MenuLocationUpdates != null)
            {
                MenuLocationUpdates.Dispose();
                MenuLocationUpdates = null;
            }

            if (MenuReport != null)
            {
                MenuReport.Dispose();
                MenuReport = null;
            }

            if (MenuUnmatch != null)
            {
                MenuUnmatch.Dispose();
                MenuUnmatch = null;
            }

            if (NoMessages != null)
            {
                NoMessages.Dispose();
                NoMessages = null;
            }

            if (RoundBottom != null)
            {
                RoundBottom.Dispose();
                RoundBottom = null;
            }

            if (Snackbar != null)
            {
                Snackbar.Dispose();
                Snackbar = null;
            }

            if (SnackBottomConstraint != null)
            {
                SnackBottomConstraint.Dispose();
                SnackBottomConstraint = null;
            }

            if (SnackTopConstraint != null)
            {
                SnackTopConstraint.Dispose();
                SnackTopConstraint = null;
            }

            if (TargetName != null)
            {
                TargetName.Dispose();
                TargetName = null;
            }

            if (UnmatchDate != null)
            {
                UnmatchDate.Dispose();
                UnmatchDate = null;
            }
        }