private void CheckDuplicates() { IEnumerable <String> keyList = DaggerfallControlsWindow.UnsavedKeybindDict.Select(kv => kv.Value); var dupes = DaggerfallControlsWindow.GetDuplicates(keyList); foreach (Button keybindButton in buttonGroup) { if (dupes.Contains(keybindButton.Label.Text)) { keybindButton.Label.TextColor = new Color(1, 0, 0); } else { keybindButton.Label.TextColor = DaggerfallUI.DaggerfallDefaultTextColor; } } }
IEnumerator WaitForKeyPress(Button button) { yield return(DaggerfallControlsWindow.WaitForKeyPress(button, CheckDuplicates, SetWaitingForInput)); }