ToString() public method

public ToString ( ) : string
return string
Example #1
0
        /// <summary>
        /// Called by the command system when a command is unrecognized.
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public bool Command(idCmdArgs args)
        {
            idInternalCvar intern = FindInternal(args.Get(0));

            if (intern == null)
            {
                return(false);
            }

            if (args.Length == 1)
            {
                // print the variable
                idConsole.WriteLine("\"{0}\" is: \"{1}\" {2} default: \"{3}\"", intern.Name, intern.ToString(), idColorString.White, intern.ResetString);

                if (intern.Description.Length > 0)
                {
                    idConsole.WriteLine("{0}{1}", idColorString.White, intern.Description);
                }
            }
            else
            {
                // set the value
                intern.Set(args.ToString(), false, false);
            }

            return(true);
        }
Example #2
0
		/// <summary>
		/// Called by the command system when a command is unrecognized.
		/// </summary>
		/// <param name="args"></param>
		/// <returns></returns>
		public bool Command(idCmdArgs args)
		{
			idInternalCvar intern = FindInternal(args.Get(0));

			if(intern == null)
			{
				return false;
			}

			if(args.Length == 1)
			{
				// print the variable
				idConsole.WriteLine("\"{0}\" is: \"{1}\" {2} default: \"{3}\"", intern.Name, intern.ToString(), idColorString.White, intern.ResetString);

				if(intern.Description.Length > 0)
				{
					idConsole.WriteLine("{0}{1}", idColorString.White, intern.Description);
				}
			}
			else
			{
				// set the value
				intern.Set(args.ToString(), false, false);
			}

			return true;
		}