void SaveChangesClick(Game game, Widget widget) { if (curHotkey.BaseKey != Key.Unknown) { hotkeys.AddHotkey(curHotkey.BaseKey, curHotkey.Flags, currentAction.GetText(), curHotkey.MoreInput); hotkeys.UserAddedHotkey(curHotkey.BaseKey, curHotkey.Flags, curHotkey.MoreInput, currentAction.GetText()); } for (int i = 0; i < numButtons; i++) { Set(i); } DisposeEditingWidgets(); }
void SaveChangesClick(Game game, Widget widget) { if (origHotkey.BaseKey != Key.Unknown) { hotkeys.RemoveHotkey(origHotkey.BaseKey, origHotkey.Flags); hotkeys.UserRemovedHotkey(origHotkey.BaseKey, origHotkey.Flags); } MenuInputWidget input = (MenuInputWidget)widgets[actionI]; if (curHotkey.BaseKey != Key.Unknown) { hotkeys.AddHotkey(curHotkey.BaseKey, curHotkey.Flags, input.GetText(), curHotkey.StaysOpen); hotkeys.UserAddedHotkey(curHotkey.BaseKey, curHotkey.Flags, curHotkey.StaysOpen, input.GetText()); } game.Gui.SetNewScreen(new HotkeyListScreen(game)); }