public void ModKeybindsShow(Mod selected) { goBackBtn.SetActive(true); selected_mod = selected; RemoveChildren(keybindsList.transform); for (int i = 0; i < Keybind.Keybinds.Count; i++) { if (Keybind.Keybinds[i].Mod == selected) { if (Keybind.Keybinds[i].ID == null && Keybind.Keybinds[i].Vals != null) { KeyBindHeader(Keybind.Keybinds[i]); } else { KeyBindsList(Keybind.Keybinds[i]); } } } ModKeyBinds.transform.GetChild(0) .GetChild(6) .GetComponent <Button>() .onClick.RemoveAllListeners(); ModKeyBinds.transform.GetChild(0) .GetChild(6) .GetComponent <Button>() .onClick.AddListener(delegate { ModSettings_menu.ResetBinds(selected); ModKeybindsShow(selected); }); goToKeybinds(); }
public void ModKeybindsShow(Mod selected) { backButton.SetActive(true); selectedMod = selected; RemoveChildren(keybindsList.transform); foreach (Keybind key in Keybind.Keybinds.Where(key => key.Mod == selected)) { if (key.ID == null && key.Vals != null) { KeyBindHeader(key); } else { KeyBindsList(key); } } Button button = modKeybinds.transform.GetChild(0).GetChild(6).GetComponent <Button>(); button.onClick.RemoveAllListeners(); button.onClick.AddListener(delegate { ModSettings_menu.ResetBinds(selected); ModKeybindsShow(selected); }); GoToKeybinds(); }
public void ModKeybindsShow(Mod selected) { goBackBtn.SetActive(true); selected_mod = selected; RemoveChildren(keybindsList.transform); foreach (Keybind key in Keybind.Keybinds) { if (key.Mod == selected) { KeyBindsList(key.Name, key.Modifier, key.Key, key.ID); } } ModKeyBinds.transform.GetChild(0).GetChild(6).GetComponent <Button>().onClick.RemoveAllListeners(); ModKeyBinds.transform.GetChild(0).GetChild(6).GetComponent <Button>().onClick.AddListener(delegate { ms.ResetBinds(selected); ModKeybindsShow(selected); }); goToKeybinds(); }