/// <summary> /// Creates a new picture box. /// </summary> /// <param name="game">The game this control belongs to.</param> /// <param name="image">The image.</param> public Picture(Game game, GuiManager manager, Texture2D image) : base(game, manager) { this.image = image; rotation = 0.0f; movable = false; visible = true; }
public GameState(Game game, EffectRenderer renderer, StateManager parent) : base(game) { childComponents = new List<GameObject>(); this.renderer = renderer; gameRef = game; guiManager = new GuiManager(gameRef); this.parent = parent; emptyTexture = game.Content.Load<Texture2D>("EmptyTile"); }
/// <summary> /// Creates a new game control. /// </summary> /// <param name="game">The game this control belongs to.</param> public GameControl(Game game, GuiManager manager) { this.game = game; position = new Vector2(); size = new Vector2(); color = Color.White; CalculateBounds(); // provide default names this.manager = manager; name = "control" + ++controlCount; }
/// <summary> /// Creates a new button control. /// </summary> /// <param name="game">The game this button belongs to.</param> /// <param name="groupName">The name of the button's group.</param> /// <param name="x">The X coordinate of the button.</param> /// <param name="y">The X coordinate of the button.</param> /// <param name="width">The width of the button.</param> /// <param name="height">The height of the button.</param> public Button(Game game, GuiManager manager, string text, float x, float y, float width, float height) : base(game, manager) { Position = new Vector2(x, y); Size = new Vector2(width, height); font = game.Content.Load<SpriteFont>("SpriteFont1"); this.text = text; texUp = Game.Content.Load<Texture2D>("Gui/Button-up"); texHover = Game.Content.Load<Texture2D>("Gui/Button-hover"); texDown = Game.Content.Load<Texture2D>("Gui/Button-down"); }
/// <summary> /// Creates a new picture box. /// </summary> /// <param name="game">The game this control belongs to.</param> /// <param name="image">The image.</param> public BoundingBox(Game game, GuiManager manager) : base(game, manager) { this.image = game.Content.Load<Texture2D>("Graphics/GUI/BoundingBox"); characterIcon = null; }
/// <summary> /// Creates a new picture box. /// </summary> /// <param name="game">The game this control belongs to.</param> /// <param name="image">The image.</param> public BoundingBox(Game game, GuiManager manager) : base(game, manager) { this.image = game.Content.Load <Texture2D>("Graphics/GUI/BoundingBox"); characterIcon = null; }