Пример #1
0
		public override void LoadContent(ContentManager content)
		{
			base.LoadContent(content);
			Bounds = new RectangleF(Bounds.X, Bounds.Y, UI_ASCII.Width * (Text.Length + 2), UI_ASCII.Height * 3);
			SetBorderSize(Text.Length + 2, 3);

			_label = new Label(Window, Camera, new Vector2(UI_ASCII.Width, UI_ASCII.Height), Text);
			_label.LoadContent(content);
			_label.CanHaveMouseHover = false;
			_labelColor = _label.TextColor;
		}
Пример #2
0
		public void LoadContent(ContentManager content)
		{
			// TODO: Create a Pause menu for saving and loading.
			// TODO: If the UI has mouse hover, I don't want the game world to respond to it.
			LoadButton = new TextButton(_window, _hudCamera, new Vector2(100, 100), "Load");
			LoadButton.LoadContent(content);
			_children.Add(LoadButton);

			SaveButton = new TextButton(_window, _hudCamera, new Vector2(100, LoadButton.Bounds.Bottom + 16), "Save");
			SaveButton.LoadContent(content);
			_children.Add(SaveButton);

			// TODO: Find a better was to manage user items.
			BuildItemToolbar(content);

			FPSLabel = new Label(_window, _hudCamera, new Vector2(256, 300), "FPS:");
			FPSLabel.LoadContent(content);
			_children.Add(FPSLabel);
		}