private void Start() { GameInput.GameButton[] buttons = GameInput.Buttons; for (int i = 0; i < (int)buttons.Length; i++) { GameInput.GameButton gameButton = buttons[i]; GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(this.lineObject); gameObject.transform.parent = base.transform; gameObject.GetComponent <OptionsKeyBinding>().Setup(gameButton); } }
public static string GetConfig() { string empty = string.Empty; GameInput.GameButton[] buttons = GameInput.Buttons; for (int i = 0; i < (int)buttons.Length; i++) { GameInput.GameButton gameButton = buttons[i]; string str = empty; empty = string.Concat(new string[] { str, "input.bind ", gameButton.Name, " ", gameButton.bindingOne.ToString(), " ", gameButton.bindingTwo.ToString(), "\n" }); } return(empty); }
public static GameInput.GameButton GetButton(string strName) { GameInput.GameButton[] buttons = GameInput.Buttons; for (int i = 0; i < (int)buttons.Length; i++) { GameInput.GameButton gameButton = buttons[i]; if (gameButton.Name == strName) { return(gameButton); } } return(null); }
public void Setup(GameInput.GameButton button) { this.labelName.Text = button.Name; this.keyOne.Text = button.bindingOne.ToString(); this.keyTwo.Text = button.bindingTwo.ToString(); if (this.keyOne.Text == "None") { this.keyOne.Text = " "; } if (this.keyTwo.Text == "None") { this.keyTwo.Text = " "; } }
public static void bind(ref ConsoleSystem.Arg args) { if (args.HasArgs(3)) { string strName = args.Args[0]; string a = args.Args[1]; string b = args.Args[2]; GameInput.GameButton button = GameInput.GetButton(strName); if (button != null) { button.Bind(a, b); } } }
public static void bind(ref ConsoleSystem.Arg args) { if (!args.HasArgs(3)) { return; } string str = args.Args[0]; string str1 = args.Args[1]; string str2 = args.Args[2]; GameInput.GameButton button = GameInput.GetButton(str); if (button != null) { button.Bind(str1, str2); } }