private string ParseGumpText(string text)
        {
            string maintext = text;

            // format for multiple selection specifications is
            // maintext ; selection0 ; response0 ; selection1 ; response1 ....

            string [] args = text.Split(';');

            // the first arg is the maintext
            if (args.Length > 0)
            {
                maintext = args[0];
                // fill the selection and responses with the remaining args
                for (int i = 1; i < args.Length; i += 2)
                {
                    GumpSelection s = new GumpSelection("", "");
                    if (i < args.Length)
                    {
                        s.Selection = args[i].Trim();
                    }
                    if (i + 1 < args.Length)
                    {
                        s.Response = args[i + 1].Trim();
                    }

                    gumpSelections.Add(s);
                }
            }

            return(maintext);
        }
Exemple #2
0
		private string ParseGumpText(string text)
		{

			string maintext = text;

			// format for multiple selection specifications is 
			// maintext ; selection0 ; response0 ; selection1 ; response1 ....

			string [] args = text.Split(';');

			// the first arg is the maintext
			if(args.Length > 0)
			{
				maintext = args[0];
				// fill the selection and responses with the remaining args
				for(int i = 1;i<args.Length;i += 2)
				{
					GumpSelection s = new GumpSelection("","");
					if(i < args.Length) s.Selection = args[i].Trim();
					if(i+1 < args.Length) s.Response = args[i+1].Trim();

					gumpSelections.Add(s);
				}
			}

			return maintext;
		}