Exemple #1
0
        private void DrawCommand(string InGroupName, string InName, ICheatCommand InCommand)
        {
            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));

            ArgumentDescriptionAttribute[] ArgTypes = InCommand.argumentsTypes;
            string[] Arguments = InCommand.arguments;

            if (ArgTypes != null && ArgTypes.Length > 0)
            {
                DebugHelper.Assert(ArgTypes.Length == Arguments.Length);

                for (int i = 0; i < ArgTypes.Length; ++i)
                {
                    ArgumentDescriptionAttribute ArgAttr = ArgTypes[i];

                    if (!DrawArgument(ArgAttr, ArgTypes, ref Arguments, ref Arguments[i]))
                    {
                        break;
                    }
                }
            }

            if (GUILayout.Button(InCommand.comment, GUILayout.Width(InCommand.comment.Length * 12 + 10)))
            {
                Logger.AddMessage(InCommand.StartProcess(Arguments));
            }

            GUILayout.EndHorizontal();
        }
Exemple #2
0
        public void AddMessage(string InMessage)
        {
            if (Viewer != null && Viewer.logger != null)
            {
                Viewer.logger.AddMessage(InMessage);
            }

            if (externalLogger != null)
            {
                externalLogger.AddMessage(InMessage);
            }
        }