Ejemplo n.º 1
0
 public void AddDrawable(Drawable drawable)
 {
     drawableList.Add(drawable);
     for (int i = 0; i < drawableList.Count; i++)
     {
         Rectangle place = new Rectangle((int)centerPoint.X, (int)centerPoint.Y + (int)((i + ((drawableList.Count - 1) * -0.5)) * Buttons.variation), drawableList[i].spacePos.Width, drawableList[i].spacePos.Height);
         drawableList[i].spacePos = new Rectangle(place.X - place.Width / 2, place.Y - place.Height / 2, place.Width, place.Height);
         drawableList[i].textSpot = new Vector2(drawableList[i].textOffset.X + drawableList[i].spacePos.X, drawableList[i].textOffset.Y + drawableList[i].spacePos.Y);
     }
 }
Ejemplo n.º 2
0
 protected void AddHeader(string name)
 {
     Drawable menu = new Drawable();
     menu.text = name;
     menu.font = Game1.font;
     menu.fontColor = Color.Black;
     menu.texture = Game1.cellT;
     menu.couleur = Color.White;
     menu.returnState = GameState.None;
     AddDrawable(menu);
 }