Esempio n. 1
0
 public void Add(MenuButton _menuButton)
 {
     //Addding menu button
     menuList.Add(_menuButton);
     //Adding button's name string
     buttonName.Add(_menuButton.name);
     //Adding button dynamic condition for button and checking if it is dyanmic
     isButtonDynamic.Add(false);
     if (_menuButton.name.IndexOf("%o") > -1) { //the string "%o" will let the program know that there's an observable value it needs to check for
         isButtonDynamic[isButtonDynamic.Count - 1] = true;
     }
     //Adding a position for the new button
     btnPosList.Add(new Vector2(menuPosition.X, menuPosition.Y + (spacing * btnPosList.Count)));
 }
Esempio n. 2
0
 public void AddMultiple(MenuButton[] _menuButtonArr)
 {
     for (int i = 0; i < _menuButtonArr.Length; i++) {
         Add(_menuButtonArr[i]);
     }
 }
Esempio n. 3
0
 public ButtonKeyChange(SpriteFont sf, Vector2 pos ,Keys k1, Color C1, Color C2)
 {
     Button = new MenuButton(sf, pos, k1.ToString(),C1,C2);
     this.Key1=k1;
     PrevKey = Key1;
 }