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)); }
void RemoveHotkeyClick(Game game, Widget widget) { if (origHotkey.Trigger != Key.None) { HotkeyList.Remove(origHotkey.Trigger, origHotkey.Flags); HotkeyList.UserRemovedHotkey(origHotkey.Trigger, origHotkey.Flags); } game.Gui.SetNewScreen(new HotkeyListScreen(game)); }
void SaveChangesClick(Game game, Widget widget) { if (origHotkey.BaseKey != Key.Unknown) { hotkeys.RemoveHotkey(origHotkey.BaseKey, origHotkey.Flags); hotkeys.UserRemovedHotkey(origHotkey.BaseKey, origHotkey.Flags); } 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 RemoveHotkeyClick(Game game, Widget widget) { if (origHotkey.BaseKey != Key.Unknown) { hotkeys.RemoveHotkey(origHotkey.BaseKey, origHotkey.Flags); hotkeys.UserRemovedHotkey(origHotkey.BaseKey, origHotkey.Flags); } for (int i = 0; i < numButtons; i++) { Set(i); } DisposeEditingWidgets(); }
void SaveChangesClick(Game game, Widget widget) { if (origHotkey.Trigger != Key.None) { HotkeyList.Remove(origHotkey.Trigger, origHotkey.Flags); HotkeyList.UserRemovedHotkey(origHotkey.Trigger, origHotkey.Flags); } MenuInputWidget input = (MenuInputWidget)widgets[actionI]; if (curHotkey.Trigger != Key.None) { HotkeyList.Add(curHotkey.Trigger, curHotkey.Flags, input.Text.ToString(), curHotkey.StaysOpen); HotkeyList.UserAddedHotkey(curHotkey.Trigger, curHotkey.Flags, curHotkey.StaysOpen, input.Text.ToString()); } game.Gui.SetNewScreen(new HotkeyListScreen(game)); }