Example #1
0
 public Save(Texture2D armyButtons, SpriteFont font, string typeSave, Texture2D decorationPic, int decorationPicNmr, SoundEffect booksound, Texture2D lineTexture)
 {
     this.typeSave = typeSave;
     write         = new WriteClass(font, lineTexture, 200, 100);
     saveName      = "";
     save          = new Button(armyButtons, 1, 2, 250, 150, font, "Save " + typeSave, booksound);
     cancel        = new Button(armyButtons, 1, 2, 450, 150, font, "Cancel", booksound);
 }
Example #2
0
 public Name(Texture2D armyButtons, Texture2D line, SpriteFont font, Texture2D decoration, int i, SoundEffect booksound)
 {
     this.booksound   = booksound;
     write            = new WriteClass(font, line, 200, 100);
     this.armyButtons = armyButtons;
     this.font        = font;
     name             = new Button(armyButtons, 1, 2, 110, 750, font, "Name Unit", booksound);
     cancel           = new Button(armyButtons, 1, 2, 310, 750, font, "Cancel Naming", booksound);
     nametxt          = "";
 }
Example #3
0
 public UnitSave(Texture2D armyButtons, SpriteFont font, string typeSave, Texture2D decorationPic, int decorationPicNmr, Texture2D markButtons,
                 string savePath, SoundEffect clickSound, SoundEffect bookSound, Texture2D lineTexture, Texture2D backGround, int x, int y, Texture2D mark, Texture2D upDown) : base(armyButtons, font, typeSave, decorationPic, decorationPicNmr, bookSound, lineTexture)
 {
     backRec         = new Rectangle(x, y + 20, backGround.Width, backGround.Height);
     this.backGround = backGround;
     this.clickSound = clickSound;
     this.button     = markButtons;
     this.font       = font;
     buttons         = new List <MarkButton>();
     write           = new WriteClass(font, lineTexture, x, y);
     save            = new Button(armyButtons, 1, 2, x, y + 20 + backGround.Height + 10, font, "Save Regiment", bookSound);
     cancel          = new Button(armyButtons, 1, 2, x + save.mainRec.Width + 10, y + 20 + backGround.Height + 10, font, "Cancel Save", bookSound);
     newfolder       = new Button(armyButtons, 1, 2, x + (save.mainRec.Width + 10) * 2, y + 20 + backGround.Height + 10, font, "New Folder", bookSound);
     foldername      = new Save(armyButtons, font, "Folder Path", decorationPic, 2, bookSound, lineTexture);
     slider          = new SliderClass(mark, upDown, backGround.Height, 32, y + 20, x + backGround.Width - upDown.Width / 4, y + 20 - upDown.Height, y + 20 + backGround.Height, x + backGround.Width - mark.Width / 2, 20);
     for (int i = 0; i < Directory.GetDirectories(savePath).Count(); i++)
     {
         string temp = Directory.GetDirectories(savePath)[i];
         temp = temp.Replace(savePath + "\\", "");
         buttons.Add(new MarkButton(markButtons, 3, 1, x + 5, y + 25 + (i * 20), temp, clickSound));
     }
     buttons[0].ChangeState();
     tempname = buttons[0].Text();
 }