Esempio n. 1
0
        public MenuPage(ContentManager content, GraphicsDevice graphicsDevice, string backgroundResourcePath, IEnumerable<MenuOption> options)
        {
            characters = new Characters(content);
            backGround = content.Load<Texture2D>(backgroundResourcePath);
            select = content.Load<SoundEffect>("MenuContent/150220__killkhan__reload-1");
            if (spriteBatch == null)
            {
                spriteBatch = new SpriteBatch(graphicsDevice);
            }

            this.graphicsDevice = graphicsDevice;
            if (options.Count() > 0)
            {
                this.CreateOptions(options);
                this.SelectPreviousOption();
            }
            else
            {
                this.options = new List<MenuOption>();
            }

            this.OptionChanged += this.PlaySelectSound;
        }
Esempio n. 2
0
 public virtual void Draw(Characters characters, Matrix view, Matrix projection)
 {
     characters.Draw(this.Text, this.actualScale, this.position, view, projection);
 }
Esempio n. 3
0
 /// <summary>
 /// Method used to draw textbox.
 /// </summary>
 /// <param name="view">View matrix.</param>
 /// <param name="projection">Projection  matrix.</param>
 public override void Draw(Characters characters, Matrix view, Matrix projection)
 {
     base.Draw(characters, view, projection);
     characters.Draw(value, actualScale, valuePosition, view, projection);
 }