コード例 #1
0
ファイル: MainWindow.cs プロジェクト: melkor54248/dungeoneye
		/// <summary>
		/// Constructor
		/// </summary>
		public MainWindow(CampDialog camp) : base(camp, "Camp :")
		{
			ScreenButton button;

			// Adds buttons
			button = new ScreenButton("Rest Party", new Rectangle(16, 40, 320, 28));
			button.Selected += new EventHandler(RestParty_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Memorize Spells", new Rectangle(16, 74, 320, 28));
			button.Selected += new EventHandler(MemorizeSpells_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Pray for Spells", new Rectangle(16, 108, 320, 28));
			button.Selected += new EventHandler(PrayForSpells_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Scribe Scrolls", new Rectangle(16, 142, 320, 28));
			button.Selected += new EventHandler(ScribeScrolls_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Preferences", new Rectangle(16, 176, 320, 28));
			button.Selected += new EventHandler(Preferences_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Game Options", new Rectangle(16, 210, 320, 28));
			button.Selected += new EventHandler(GameOptions_Selected);
			Buttons.Add(button);

			button = new ScreenButton("Exit", new Rectangle(256, 244, 80, 28));
			button.Selected += new EventHandler(Exit_Selected);
			Buttons.Add(button);

		}
コード例 #2
0
ファイル: MessageBox.cs プロジェクト: melkor54248/dungeoneye
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="text">Text to display</param>
		/// <param name="buttons">Buttons to display</param>
		public MessageBox(string text, MessageBoxButtons buttons)
		{
			Text = text;
			DialogResult = DialogResult.None;

			// Background
			Rectangle = new Rectangle(16, 40, 320, 112);

			Buttons = new List<ScreenButton>();
			ScreenButton button = null;
			switch (buttons)
			{
				case MessageBoxButtons.OK:
				break;
				case MessageBoxButtons.OKCancel:
				break;
				case MessageBoxButtons.AbortRetryIgnore:
				break;
				case MessageBoxButtons.YesNoCancel:
				break;
				case MessageBoxButtons.YesNo:
				{
					button = new ScreenButton("Yes", new Rectangle(16, 74, 64, 28));
					button.Selected += new EventHandler(Yes_Selected);
					Buttons.Add(button);

					button = new ScreenButton("No", new Rectangle(240, 74, 64, 28));
					button.Selected += new EventHandler(No_Selected);
					Buttons.Add(button);
				}
				break;
				case MessageBoxButtons.RetryCancel:
				break;
			}
		}
コード例 #3
0
		/// <summary>
		/// Constructor
		/// </summary>
		public DropNPCWindow(CampDialog camp) : base(camp, "Drop Character")
		{
			if (GameScreen.Team.HeroCount <= 4)
			{
				Closing = true;
				return;
			}

			Interface = ResourceManager.LockSharedAsset<TileSet>("Interface");

			// Adds buttons
			ScreenButton button;
			button = new ScreenButton("Exit", new Rectangle(256, 244, 80, 28));
			button.Selected += new EventHandler(Exit_Selected);
			Buttons.Add(button);

			RectangleColor = Color.White;
			Message = "Select a character<br />from your party<br />who would like to<br />drop.";
		}
コード例 #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="text">Text to display</param>
        /// <param name="buttons">Buttons to display</param>
        public MessageBox(string text, MessageBoxButtons buttons)
        {
            Text         = text;
            DialogResult = DialogResult.None;

            // Background
            Rectangle = new Rectangle(16, 40, 320, 112);

            Buttons = new List <ScreenButton>();
            ScreenButton button = null;

            switch (buttons)
            {
            case MessageBoxButtons.OK:
                break;

            case MessageBoxButtons.OKCancel:
                break;

            case MessageBoxButtons.AbortRetryIgnore:
                break;

            case MessageBoxButtons.YesNoCancel:
                break;

            case MessageBoxButtons.YesNo:
            {
                button           = new ScreenButton("Yes", new Rectangle(16, 74, 64, 28));
                button.Selected += new EventHandler(Yes_Selected);
                Buttons.Add(button);

                button           = new ScreenButton("No", new Rectangle(240, 74, 64, 28));
                button.Selected += new EventHandler(No_Selected);
                Buttons.Add(button);
            }
            break;

            case MessageBoxButtons.RetryCancel:
                break;
            }
        }
コード例 #5
0
ファイル: SpellWindow.cs プロジェクト: melkor54248/dungeoneye
		/// <summary>
		/// Constructor
		/// </summary>
		public SpellWindow(CampDialog camp) : base(camp, "")
		{
			Interface = ResourceManager.LockSharedAsset<TileSet>("Interface");
	
			// Adds buttons
			ScreenButton button;

			button = new ScreenButton("Exit", new Rectangle(256, 244, 80, 28));
			button.Selected += new EventHandler(Exit_Selected);
			Buttons.Add(button);


			Levels = new ScreenButton[6];
			for (int i = 0 ; i < 6 ; i++)
			{
				Levels[i] = new ScreenButton((i + 1).ToString(), new Rectangle(22 + i * 54, 32, 40, 36));
				Levels[i].Selected += new EventHandler(Level_Selected);
				Levels[i].ReactOnMouseOver = false;
				Levels[i].IsVisible = false;
				Buttons.Add(Levels[i]);
			}

			RectangleColor = Color.White;
		}
コード例 #6
0
ファイル: CharGen.cs プロジェクト: melkor54248/dungeoneye
		/// <summary>
		/// Loads content
		/// </summary>
		public override void LoadContent()
		{
			Trace.WriteLine("[CharGen] LoadContent()");

			Batch = new SpriteBatch();

			Tileset = ResourceManager.CreateAsset<TileSet>("CharGen");

			Heads = ResourceManager.CreateAsset<TileSet>("Heads");

			Font = ResourceManager.CreateAsset<BitmapFont>("intro");

			NameFont = ResourceManager.CreateAsset<BitmapFont>("name");

			PlayButton = new ScreenButton(string.Empty, new Rectangle(48, 362, 166, 32));
			PlayButton.Selected += new EventHandler(PlayButton_Selected);

			StringTable = ResourceManager.CreateAsset<StringTable>("Chargen");
			StringTable.LanguageName = Game.LanguageName;

			Anims = ResourceManager.CreateAsset<Animation>("Animations");
			Anims.Play();

			CurrentState = CharGenStates.SelectHero;



			// Load name list
			using (Stream stream = ResourceManager.Load("names.xml"))
			{
				if (stream != null)
				{
					XmlReader xr = XmlReader.Create(stream);
					Names = XDocument.Load(xr);
				}
			}

		}
コード例 #7
0
ファイル: SpellWindow.cs プロジェクト: melkor54248/dungeoneye
		/// <summary>
		/// Change GUI elements when a new hero is selected
		/// </summary>
		void HeroSelected()
		{
			// Buttons already present
			if (Hero != null)
				return;


			Title = "Spells Available :";

			ScreenButton button;
			button = new ScreenButton("Clear", new Rectangle(16, 244, 96, 28));
			button.Selected += new EventHandler(Clear_Selected);
			Buttons.Add(button);

			for (int i = 0 ; i < 6 ; i++)
				Levels[i].IsVisible = true;

			Levels[0].TextColor = GameColors.Red;
			SpellLevel = 1;
		}