예제 #1
0
        private static bool ShouldDisplay(LogType type)
        {
            switch (type)
            {
            case LogType.Log:
                return(ShowInfo);

            case LogType.Warning:
                return(ShowWarning);

            case LogType.Error:
                return(ShowError);

            default:
                return(false);
            }
        }
예제 #2
0
        private static bool ShouldDisplay(LogType type)
        {
            switch (type)
            {
                case LogType.Log:
                    return ShowInfo;

                case LogType.Warning:
                    return ShowWarning;

                case LogType.Error:
                    return ShowError;

                default:
                    return false;
            }

        }
예제 #3
0
        private static bool Box(string content, LogType logType, bool isOdd, bool isSelected)
        {
            if (isSelected)
            {
                boxStyle.normal.background = boxBgSelected;
            }
            else
            {
                boxStyle.normal.background = isOdd ? boxBgOdd : boxBgEven;
            }

            switch (logType)
            {
                case LogType.Error: icon = errorIcon; break;
                case LogType.Warning: icon = warningIcon; break;
                case LogType.Log: icon = infoIcon; break;
            }

            return GUILayout.Button(new GUIContent(content, icon), boxStyle, GUILayout.ExpandWidth(true), GUILayout.Height(rowHeight));
        }