KeyBindingButton_OnClick(self, button, down);
self:RegisterForClicks("AnyUp");
FauxScrollFrame_OnVerticalScroll(self, offset, KEY_BINDING_HEIGHT, KeyBindingFrame_Update);
if ( KeyBindingFrame.selected ) then if ( delta > 0 ) then KeyBindingFrame_OnKeyDown(self, "MOUSEWHEELUP"); else KeyBindingFrame_OnKeyDown(self, "MOUSEWHEELDOWN"); end else ScrollFrameTemplate_OnMouseWheel(self, delta); end
KeyBindingFrameCharacterButtonText:SetText(HIGHLIGHT_FONT_COLOR_CODE..CHARACTER_SPECIFIC_KEYBINDINGS..FONT_COLOR_CODE_CLOSE);
if ( KeyBindingFrame.bindingsChanged ) then StaticPopup_Show("CONFIRM_LOSE_BINDING_CHANGES"); else KeyBindingFrame_ChangeBindingProfile(); end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); GameTooltip:SetText(CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP, nil, nil, nil, nil, 1);
LoadBindings(DEFAULT_BINDINGS); KeyBindingFrameOutputText:SetText(""); KeyBindingFrame_SetSelected(nil); KeyBindingFrame_Update();
LoadBindings(GetCurrentBindingSet()); KeyBindingFrameOutputText:SetText(""); KeyBindingFrame_SetSelected(nil); HideUIPanel(KeyBindingFrame);
if ( KeyBindingFrameCharacterButton:GetChecked() ) then KeyBindingFrame.which = CHARACTER_BINDINGS; else KeyBindingFrame.which = ACCOUNT_BINDINGS; if ( GetCurrentBindingSet() == CHARACTER_BINDINGS ) then if ( not CONFIRMED_DELETING_CHARACTER_SPECIFIC_BINDINGS ) then StaticPopup_Show("CONFIRM_DELETING_CHARACTER_SPECIFIC_BINDINGS"); return; end end end SaveBindings(KeyBindingFrame.which); KeyBindingFrameOutputText:SetText(""); KeyBindingFrame_SetSelected(nil); HideUIPanel(KeyBindingFrame);
local key1, key2 = GetBindingKey(KeyBindingFrame.selected, KeyBindingFrame.mode); if ( key1 ) then SetBinding(key1, nil, KeyBindingFrame.mode); end if ( key2 ) then SetBinding(key2, nil, KeyBindingFrame.mode); end if ( key1 and KeyBindingFrame.keyID == 1 ) then KeyBindingFrame_SetBinding(key1, nil, key1); if ( key2 ) then SetBinding(key2, KeyBindingFrame.selected, KeyBindingFrame.mode); end else if ( key1 ) then KeyBindingFrame_SetBinding(key1, KeyBindingFrame.selected); end if ( key2 ) then KeyBindingFrame_SetBinding(key2, nil, key2); end end KeyBindingFrame_Update(); -- Button highlighting stuff KeyBindingFrame_SetSelected(nil); KeyBindingFrame.buttonPressed:UnlockHighlight(); KeyBindingFrame_UpdateUnbindKey(); KeyBindingFrameOutputText:SetText();
KeyBindingFrame_OnShow(self); Disable_BagButtons(); UpdateMicroButtons();
KeyBindingFrameOutputText:SetText(""); PlaySound("gsTitleOptionExit"); ShowUIPanel(GameMenuFrame); UpdateMicroButtons();