ascension: 4.4.2 → vendored 4.4.2-2-g3b02ee4 (in-game AddOns dir)
Imported from /srv/add01/wow-ascension/Interface/AddOns/Bartender4 — the build Ascension's WotLK 3.3.5 client ships. Single vendored drop: Ascension's build process bundles their custom patches with the standard CurseForge packager output (embedded libs), and the individual patches aren't published separately. Net delta vs Nevcairiel 4.4.2, excluding bundled libs and CRLF normalization: 21 files, 2213+/52- — the Ascension-specific adaptations for WotLK 3.3.5 hero classes / custom action systems. License: All rights reserved (per .toc).
This commit is contained in:
@@ -0,0 +1,673 @@
|
||||
--[[
|
||||
Name: LibKeyBound-1.0
|
||||
Revision: $Rev: 95 $
|
||||
Author(s): Gello, Maul, Toadkiller, Tuller
|
||||
Website: http://www.wowace.com/wiki/LibKeyBound-1.0
|
||||
Documentation: http://www.wowace.com/wiki/LibKeyBound-1.0
|
||||
SVN: http://svn.wowace.com/wowace/trunk/LibKeyBound-1.0
|
||||
Description: An intuitive keybindings system: mouseover frame, click keys or buttons.
|
||||
Dependencies: CallbackHandler-1.0
|
||||
--]]
|
||||
|
||||
local MAJOR = 'LibKeyBound-1.0'
|
||||
local MINOR = tonumber(("$Revision: 95 $"):match("(%d+)")) + 90000
|
||||
|
||||
--[[
|
||||
LibKeyBound-1.0
|
||||
ClickBinder by Gello and TrinityBinder by Maul -> keyBound by Tuller -> LibKeyBound library by Toadkiller
|
||||
|
||||
Functions needed to implement
|
||||
button:GetHotkey() - returns the current hotkey assigned to the given button
|
||||
|
||||
Functions to implement if using a custom keybindings system:
|
||||
button:SetKey(key) - binds the given key to the given button
|
||||
button:FreeKey(key) - unbinds the given key from all other buttons
|
||||
button:ClearBindings() - removes all keys bound to the given button
|
||||
button:GetBindings() - returns a string listing all bindings of the given button
|
||||
button:GetActionName() - what we're binding to, used for printing
|
||||
--]]
|
||||
|
||||
local LibKeyBound, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not LibKeyBound then return end -- no upgrade needed
|
||||
|
||||
local _G = _G
|
||||
local NUM_MOUSE_BUTTONS = 31
|
||||
|
||||
-- CallbackHandler
|
||||
LibKeyBound.events = LibKeyBound.events or _G.LibStub('CallbackHandler-1.0'):New(LibKeyBound)
|
||||
|
||||
local L = LibKeyBoundLocale10
|
||||
LibKeyBound.L = L
|
||||
-- ToDo delete global LibKeyBoundLocale10 at some point
|
||||
LibKeyBound.Binder = LibKeyBound.Binder or {}
|
||||
|
||||
-- #NODOC
|
||||
function LibKeyBound:Initialize()
|
||||
do
|
||||
local f = CreateFrame('Frame', 'KeyboundDialog', UIParent)
|
||||
f:SetFrameStrata('DIALOG')
|
||||
f:SetToplevel(true)
|
||||
f:EnableMouse(true)
|
||||
f:SetClampedToScreen(true)
|
||||
f:SetWidth(360)
|
||||
f:SetHeight(140)
|
||||
f:SetBackdrop{
|
||||
bgFile='Interface\\DialogFrame\\UI-DialogBox-Background' ,
|
||||
edgeFile='Interface\\DialogFrame\\UI-DialogBox-Border',
|
||||
tile = true,
|
||||
insets = {left = 11, right = 12, top = 12, bottom = 11},
|
||||
tileSize = 32,
|
||||
edgeSize = 32,
|
||||
}
|
||||
f:SetPoint('TOP', 0, -24)
|
||||
f:Hide()
|
||||
f:SetScript('OnShow', function() PlaySound('igMainMenuOption') end)
|
||||
f:SetScript('OnHide', function() PlaySound('gsTitleOptionExit') end)
|
||||
|
||||
local tr = f:CreateTitleRegion()
|
||||
tr:SetAllPoints(f)
|
||||
|
||||
local header = f:CreateTexture(nil, 'ARTWORK')
|
||||
header:SetTexture('Interface\\DialogFrame\\UI-DialogBox-Header')
|
||||
header:SetWidth(256); header:SetHeight(64)
|
||||
header:SetPoint('TOP', 0, 12)
|
||||
|
||||
local title = f:CreateFontString('ARTWORK')
|
||||
title:SetFontObject('GameFontNormal')
|
||||
title:SetPoint('TOP', header, 'TOP', 0, -14)
|
||||
title:SetText(L.BindingMode)
|
||||
|
||||
local desc = f:CreateFontString('ARTWORK')
|
||||
desc:SetFontObject('GameFontHighlight')
|
||||
desc:SetJustifyV('TOP')
|
||||
desc:SetJustifyH('LEFT')
|
||||
desc:SetPoint('TOPLEFT', 18, -32)
|
||||
desc:SetPoint('BOTTOMRIGHT', -18, 48)
|
||||
desc:SetText(format(L.BindingsHelp, GetBindingText('ESCAPE', 'KEY_')))
|
||||
|
||||
-- Per character bindings checkbox
|
||||
local perChar = CreateFrame('CheckButton', 'KeyboundDialogCheck', f, 'OptionsCheckButtonTemplate')
|
||||
_G[perChar:GetName() .. 'Text']:SetText(CHARACTER_SPECIFIC_KEYBINDINGS)
|
||||
|
||||
perChar:SetScript('OnShow', function(self)
|
||||
self:SetChecked(GetCurrentBindingSet() == 2)
|
||||
end)
|
||||
|
||||
local current
|
||||
perChar:SetScript('OnClick', function(self)
|
||||
current = (perChar:GetChecked() and 2) or 1
|
||||
LoadBindings(current)
|
||||
end)
|
||||
|
||||
-- Okay bindings checkbox
|
||||
local okayBindings = CreateFrame('CheckButton', 'KeyboundDialogOkay', f, 'OptionsButtonTemplate')
|
||||
getglobal(okayBindings:GetName() .. 'Text'):SetText(OKAY)
|
||||
|
||||
okayBindings:SetScript('OnClick', function(self)
|
||||
current = (perChar:GetChecked() and 2) or 1
|
||||
if InCombatLockdown() then
|
||||
self:RegisterEvent('PLAYER_REGEN_ENABLED')
|
||||
else
|
||||
SaveBindings(current)
|
||||
LibKeyBound:Deactivate()
|
||||
end
|
||||
end)
|
||||
|
||||
okayBindings:SetScript('OnHide', function(self)
|
||||
current = (perChar:GetChecked() and 2) or 1
|
||||
if InCombatLockdown() then
|
||||
self:RegisterEvent('PLAYER_REGEN_ENABLED')
|
||||
else
|
||||
SaveBindings(current)
|
||||
end
|
||||
end)
|
||||
|
||||
okayBindings:SetScript('OnEvent', function(self, event)
|
||||
SaveBindings(current)
|
||||
self:UnregisterEvent(event)
|
||||
LibKeyBound:Deactivate()
|
||||
end)
|
||||
|
||||
-- Cancel bindings checkbox
|
||||
local cancelBindings = CreateFrame('CheckButton', 'KeyboundDialogCancel', f, 'OptionsButtonTemplate')
|
||||
getglobal(cancelBindings:GetName() .. 'Text'):SetText(CANCEL)
|
||||
|
||||
cancelBindings:SetScript('OnClick', function(self)
|
||||
if InCombatLockdown() then
|
||||
self:RegisterEvent('PLAYER_REGEN_ENABLED')
|
||||
else
|
||||
LoadBindings(GetCurrentBindingSet())
|
||||
LibKeyBound:Deactivate()
|
||||
end
|
||||
end)
|
||||
|
||||
cancelBindings:SetScript('OnEvent', function(self, event)
|
||||
LoadBindings(GetCurrentBindingSet())
|
||||
self:UnregisterEvent(event)
|
||||
LibKeyBound:Deactivate()
|
||||
end)
|
||||
|
||||
--position buttons
|
||||
perChar:SetPoint('BOTTOMLEFT', 14, 32)
|
||||
cancelBindings:SetPoint('BOTTOMRIGHT', -14, 14)
|
||||
okayBindings:SetPoint('RIGHT', cancelBindings, 'LEFT')
|
||||
|
||||
self.dialog = f
|
||||
end
|
||||
|
||||
SlashCmdList['LibKeyBoundSlashCOMMAND'] = function() self:Toggle() end
|
||||
SLASH_LibKeyBoundSlashCOMMAND1 = '/libkeybound'
|
||||
SLASH_LibKeyBoundSlashCOMMAND2 = '/kb'
|
||||
SLASH_LibKeyBoundSlashCOMMAND3 = '/lkb'
|
||||
|
||||
LibKeyBound.initialized = true
|
||||
end
|
||||
|
||||
|
||||
-- Default color to indicate bindable frames in your mod.
|
||||
LibKeyBound.colorKeyBoundMode = LibKeyBound.colorKeyBoundMode or { 0, 1, 1, 0.5 }
|
||||
|
||||
--[[
|
||||
LibKeyBound:SetColorKeyBoundMode([r][, g][, b][, a])
|
||||
--]]
|
||||
--[[
|
||||
Arguments:
|
||||
number - red, default 0
|
||||
number - green, default 0
|
||||
number - blue, default 0
|
||||
number - alpha, default 1
|
||||
|
||||
Example:
|
||||
if (MyMod.keyBoundMode) then
|
||||
overlayFrame:SetBackdropColor(LibKeyBound:GetColorKeyBoundMode())
|
||||
end
|
||||
...
|
||||
local r, g, b, a = LibKeyBound:GetColorKeyBoundMode()
|
||||
|
||||
Notes:
|
||||
* Returns the color to use on your participating buttons during KeyBound Mode
|
||||
* Values are unpacked and ready to use as color arguments
|
||||
--]]
|
||||
function LibKeyBound:SetColorKeyBoundMode(r, g, b, a)
|
||||
r, g, b, a = r or 0, g or 0, b or 0, a or 1
|
||||
LibKeyBound.colorKeyBoundMode[1] = r
|
||||
LibKeyBound.colorKeyBoundMode[2] = g
|
||||
LibKeyBound.colorKeyBoundMode[3] = b
|
||||
LibKeyBound.colorKeyBoundMode[4] = a
|
||||
LibKeyBound.events:Fire('LIBKEYBOUND_MODE_COLOR_CHANGED')
|
||||
end
|
||||
|
||||
--[[
|
||||
Returns:
|
||||
* number - red
|
||||
* number - green
|
||||
* number - blue
|
||||
* number - alpha
|
||||
|
||||
Example:
|
||||
if (MyMod.keyBoundMode) then
|
||||
overlayFrame:SetBackdropColor(LibKeyBound:GetColorKeyBoundMode())
|
||||
end
|
||||
...
|
||||
local r, g, b, a = LibKeyBound:GetColorKeyBoundMode()
|
||||
|
||||
Notes:
|
||||
* Returns the color to use on your participating buttons during KeyBound Mode
|
||||
* Values are unpacked and ready to use as color arguments
|
||||
--]]
|
||||
function LibKeyBound:GetColorKeyBoundMode()
|
||||
return unpack(LibKeyBound.colorKeyBoundMode)
|
||||
end
|
||||
|
||||
|
||||
function LibKeyBound:PLAYER_REGEN_ENABLED()
|
||||
if self.enabled then
|
||||
UIErrorsFrame:AddMessage(L.CombatBindingsEnabled, 1, 0.3, 0.3, 1, UIERRORS_HOLD_TIME)
|
||||
self.dialog:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound:PLAYER_REGEN_DISABLED()
|
||||
if self.enabled then
|
||||
self:Set(nil)
|
||||
UIErrorsFrame:AddMessage(L.CombatBindingsDisabled, 1, 0.3, 0.3, 1, UIERRORS_HOLD_TIME)
|
||||
self.dialog:Show()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Notes:
|
||||
* Switches KeyBound Mode between on and off
|
||||
|
||||
Example:
|
||||
local LibKeyBound = LibStub('LibKeyBound-1.0')
|
||||
LibKeyBound:Toggle()
|
||||
--]]
|
||||
function LibKeyBound:Toggle()
|
||||
if (LibKeyBound:IsShown()) then
|
||||
LibKeyBound:Deactivate()
|
||||
else
|
||||
LibKeyBound:Activate()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Notes:
|
||||
* Switches KeyBound Mode to on
|
||||
|
||||
Example:
|
||||
local LibKeyBound = LibStub('LibKeyBound-1.0')
|
||||
LibKeyBound:Activate()
|
||||
--]]
|
||||
function LibKeyBound:Activate()
|
||||
if not self:IsShown() then
|
||||
if InCombatLockdown() then
|
||||
UIErrorsFrame:AddMessage(L.CannotBindInCombat, 1, 0.3, 0.3, 1, UIERRORS_HOLD_TIME)
|
||||
else
|
||||
self.enabled = true
|
||||
if not self.frame then
|
||||
self.frame = LibKeyBound.Binder:Create()
|
||||
end
|
||||
self:Set(nil)
|
||||
self.dialog:Show()
|
||||
self.events:Fire('LIBKEYBOUND_ENABLED')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Notes:
|
||||
* Switches KeyBound Mode to off
|
||||
|
||||
Example:
|
||||
local LibKeyBound = LibStub('LibKeyBound-1.0')
|
||||
LibKeyBound:Deactivate()
|
||||
--]]
|
||||
function LibKeyBound:Deactivate()
|
||||
if self:IsShown() then
|
||||
self.enabled = nil
|
||||
self:Set(nil)
|
||||
self.dialog:Hide()
|
||||
|
||||
self.events:Fire('LIBKEYBOUND_DISABLED')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns:
|
||||
boolean - true if KeyBound Mode is currently on
|
||||
|
||||
Example:
|
||||
local LibKeyBound = LibStub('LibKeyBound-1.0')
|
||||
local isKeyBoundMode = LibKeyBound:IsShown()
|
||||
if (isKeyBoundMode) then
|
||||
-- Do something
|
||||
else
|
||||
-- Do another thing
|
||||
end
|
||||
|
||||
Notes:
|
||||
* Is KeyBound Mode currently on
|
||||
--]]
|
||||
function LibKeyBound:IsShown()
|
||||
return self.enabled
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Arguments:
|
||||
table - the button frame
|
||||
|
||||
Example:
|
||||
local button = this
|
||||
LibKeyBound:Set(button)
|
||||
|
||||
Notes:
|
||||
* Sets up button for keybinding
|
||||
* Call this in your OnEnter script for the button
|
||||
* Current bindings are shown in the tooltip
|
||||
* Primary binding is shown in green in the button text
|
||||
--]]
|
||||
function LibKeyBound:Set(button)
|
||||
local bindFrame = self.frame
|
||||
|
||||
if button and self:IsShown() and not InCombatLockdown() then
|
||||
bindFrame.button = button
|
||||
bindFrame:SetAllPoints(button)
|
||||
|
||||
bindFrame.text:SetFontObject('GameFontNormalLarge')
|
||||
bindFrame.text:SetText(button:GetHotkey())
|
||||
if bindFrame.text:GetStringWidth() > bindFrame:GetWidth() then
|
||||
bindFrame.text:SetFontObject('GameFontNormal')
|
||||
end
|
||||
bindFrame:Show()
|
||||
bindFrame:OnEnter()
|
||||
elseif bindFrame then
|
||||
bindFrame.button = nil
|
||||
bindFrame:ClearAllPoints()
|
||||
bindFrame:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Arguments:
|
||||
string - the keyString to shorten
|
||||
|
||||
Returns:
|
||||
string - the shortened displayString
|
||||
|
||||
Example:
|
||||
local key1 = GetBindingKey(button:GetName())
|
||||
local displayKey = LibKeyBound:ToShortKey(key1)
|
||||
return displayKey
|
||||
|
||||
Notes:
|
||||
* Shortens the key text (returned from GetBindingKey etc.)
|
||||
* Result is suitable for display on a button
|
||||
* Can be used for your button:GetHotkey() return value
|
||||
--]]
|
||||
function LibKeyBound:ToShortKey(key)
|
||||
if key then
|
||||
key = key:upper()
|
||||
key = key:gsub(' ', '')
|
||||
key = key:gsub('ALT%-', L['Alt'])
|
||||
key = key:gsub('CTRL%-', L['Ctrl'])
|
||||
key = key:gsub('SHIFT%-', L['Shift'])
|
||||
key = key:gsub('NUMPAD', L['NumPad'])
|
||||
|
||||
key = key:gsub('PLUS', '%+')
|
||||
key = key:gsub('MINUS', '%-')
|
||||
key = key:gsub('MULTIPLY', '%*')
|
||||
key = key:gsub('DIVIDE', '%/')
|
||||
|
||||
key = key:gsub('BACKSPACE', L['Backspace'])
|
||||
|
||||
for i = 1, NUM_MOUSE_BUTTONS do
|
||||
key = key:gsub('BUTTON' .. i, L['Button' .. i])
|
||||
end
|
||||
|
||||
key = key:gsub('CAPSLOCK', L['Capslock'])
|
||||
key = key:gsub('CLEAR', L['Clear'])
|
||||
key = key:gsub('DELETE', L['Delete'])
|
||||
key = key:gsub('END', L['End'])
|
||||
key = key:gsub('HOME', L['Home'])
|
||||
key = key:gsub('INSERT', L['Insert'])
|
||||
key = key:gsub('MOUSEWHEELDOWN', L['Mouse Wheel Down'])
|
||||
key = key:gsub('MOUSEWHEELUP', L['Mouse Wheel Up'])
|
||||
key = key:gsub('NUMLOCK', L['Num Lock'])
|
||||
key = key:gsub('PAGEDOWN', L['Page Down'])
|
||||
key = key:gsub('PAGEUP', L['Page Up'])
|
||||
key = key:gsub('SCROLLLOCK', L['Scroll Lock'])
|
||||
key = key:gsub('SPACEBAR', L['Spacebar'])
|
||||
key = key:gsub('TAB', L['Tab'])
|
||||
|
||||
key = key:gsub('DOWNARROW', L['Down Arrow'])
|
||||
key = key:gsub('LEFTARROW', L['Left Arrow'])
|
||||
key = key:gsub('RIGHTARROW', L['Right Arrow'])
|
||||
key = key:gsub('UPARROW', L['Up Arrow'])
|
||||
|
||||
return key
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[ Binder Widget ]]--
|
||||
|
||||
function LibKeyBound.Binder:Create()
|
||||
local binder = CreateFrame('Button')
|
||||
binder:RegisterForClicks('anyUp')
|
||||
binder:SetFrameStrata('DIALOG')
|
||||
binder:EnableKeyboard(true)
|
||||
binder:EnableMouseWheel(true)
|
||||
|
||||
for k,v in pairs(self) do
|
||||
binder[k] = v
|
||||
end
|
||||
|
||||
local bg = binder:CreateTexture()
|
||||
bg:SetTexture(0, 0, 0, 0.5)
|
||||
bg:SetAllPoints(binder)
|
||||
|
||||
local text = binder:CreateFontString('OVERLAY')
|
||||
text:SetFontObject('GameFontNormalLarge')
|
||||
text:SetTextColor(0, 1, 0)
|
||||
text:SetAllPoints(binder)
|
||||
binder.text = text
|
||||
|
||||
binder:SetScript('OnClick', self.OnKeyDown)
|
||||
binder:SetScript('OnKeyDown', self.OnKeyDown)
|
||||
binder:SetScript('OnMouseWheel', self.OnMouseWheel)
|
||||
binder:SetScript('OnEnter', self.OnEnter)
|
||||
binder:SetScript('OnLeave', self.OnLeave)
|
||||
binder:SetScript('OnHide', self.OnHide)
|
||||
binder:Hide()
|
||||
|
||||
return binder
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:OnHide()
|
||||
LibKeyBound:Set(nil)
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:OnKeyDown(key)
|
||||
local button = self.button
|
||||
if not button then return end
|
||||
|
||||
if (key == 'UNKNOWN' or key == 'LSHIFT' or key == 'RSHIFT' or
|
||||
key == 'LCTRL' or key == 'RCTRL' or key == 'LALT' or key == 'RALT') then
|
||||
return
|
||||
end
|
||||
|
||||
local screenshotKey = GetBindingKey('SCREENSHOT')
|
||||
if screenshotKey and key == screenshotKey then
|
||||
Screenshot()
|
||||
return
|
||||
end
|
||||
|
||||
local openChatKey = GetBindingKey('OPENCHAT')
|
||||
if openChatKey and key == openChatKey then
|
||||
ChatFrameEditBox:Show()
|
||||
return
|
||||
end
|
||||
|
||||
if key == 'ESCAPE' then
|
||||
self:ClearBindings(button)
|
||||
LibKeyBound:Set(button)
|
||||
return
|
||||
end
|
||||
|
||||
-- dont bind unmodified left or right button
|
||||
if (key == 'LeftButton' or key == 'RightButton') and not IsModifierKeyDown() then
|
||||
return
|
||||
end
|
||||
|
||||
--handle mouse button substitutions
|
||||
if key == 'LeftButton' then
|
||||
key = 'BUTTON1'
|
||||
elseif key == 'RightButton' then
|
||||
key = 'BUTTON2'
|
||||
elseif key == 'MiddleButton' then
|
||||
key = 'BUTTON3'
|
||||
elseif key:match('^Button%d+$') then
|
||||
key = key:upper()
|
||||
end
|
||||
|
||||
--apply modifiers
|
||||
if IsModifierKeyDown() then
|
||||
if IsShiftKeyDown() then
|
||||
key = 'SHIFT-' .. key
|
||||
end
|
||||
if IsControlKeyDown() then
|
||||
key = 'CTRL-' .. key
|
||||
end
|
||||
if IsAltKeyDown() then
|
||||
key = 'ALT-' .. key
|
||||
end
|
||||
end
|
||||
|
||||
if button:IsMouseOver() then
|
||||
self:SetKey(button, key)
|
||||
LibKeyBound:Set(button)
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:OnMouseWheel(arg1)
|
||||
if arg1 > 0 then
|
||||
self:OnKeyDown('MOUSEWHEELUP')
|
||||
else
|
||||
self:OnKeyDown('MOUSEWHEELDOWN')
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:OnEnter()
|
||||
local button = self.button
|
||||
if button and not InCombatLockdown() then
|
||||
if self:GetRight() >= (GetScreenWidth() / 2) then
|
||||
GameTooltip:SetOwner(self, 'ANCHOR_LEFT')
|
||||
else
|
||||
GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
|
||||
end
|
||||
|
||||
if button.GetActionName then
|
||||
GameTooltip:SetText(button:GetActionName(), 1, 1, 1)
|
||||
else
|
||||
GameTooltip:SetText(button:GetName(), 1, 1, 1)
|
||||
end
|
||||
|
||||
local bindings = self:GetBindings(button)
|
||||
if bindings then
|
||||
GameTooltip:AddLine(bindings, 0, 1, 0)
|
||||
GameTooltip:AddLine(L.ClearTip)
|
||||
else
|
||||
GameTooltip:AddLine(L.NoKeysBoundTip, 0, 1, 0)
|
||||
end
|
||||
GameTooltip:Show()
|
||||
else
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:OnLeave()
|
||||
LibKeyBound:Set(nil)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
|
||||
--[[ Update Functions ]]--
|
||||
|
||||
function LibKeyBound.Binder:ToBinding(button)
|
||||
return format('CLICK %s:LeftButton', button:GetName())
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:FreeKey(button, key)
|
||||
local msg
|
||||
if button.FreeKey then
|
||||
local action = button:FreeKey(key)
|
||||
if button:FreeKey(key) then
|
||||
msg = format(L.UnboundKey, GetBindingText(key, 'KEY_'), action)
|
||||
end
|
||||
else
|
||||
local action = GetBindingAction(key)
|
||||
if action and action ~= '' and action ~= self:ToBinding(button) then
|
||||
msg = format(L.UnboundKey, GetBindingText(key, 'KEY_'), action)
|
||||
end
|
||||
end
|
||||
|
||||
if msg then
|
||||
UIErrorsFrame:AddMessage(msg, 1, 0.82, 0, 1, UIERRORS_HOLD_TIME)
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:SetKey(button, key)
|
||||
if InCombatLockdown() then
|
||||
UIErrorsFrame:AddMessage(L.CannotBindInCombat, 1, 0.3, 0.3, 1, UIERRORS_HOLD_TIME)
|
||||
else
|
||||
self:FreeKey(button, key)
|
||||
|
||||
if button.SetKey then
|
||||
button:SetKey(key)
|
||||
else
|
||||
SetBindingClick(key, button:GetName(), 'LeftButton')
|
||||
end
|
||||
|
||||
local msg
|
||||
if button.GetActionName then
|
||||
msg = format(L.BoundKey, GetBindingText(key, 'KEY_'), button:GetActionName())
|
||||
else
|
||||
msg = format(L.BoundKey, GetBindingText(key, 'KEY_'), button:GetName())
|
||||
end
|
||||
UIErrorsFrame:AddMessage(msg, 1, 1, 1, 1, UIERRORS_HOLD_TIME)
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:ClearBindings(button)
|
||||
if InCombatLockdown() then
|
||||
UIErrorsFrame:AddMessage(L.CannotBindInCombat, 1, 0.3, 0.3, 1, UIERRORS_HOLD_TIME)
|
||||
else
|
||||
if button.ClearBindings then
|
||||
button:ClearBindings()
|
||||
else
|
||||
local binding = self:ToBinding(button)
|
||||
while (GetBindingKey(binding)) do
|
||||
SetBinding(GetBindingKey(binding), nil)
|
||||
end
|
||||
end
|
||||
|
||||
local msg
|
||||
if button.GetActionName then
|
||||
msg = format(L.ClearedBindings, button:GetActionName())
|
||||
else
|
||||
msg = format(L.ClearedBindings, button:GetName())
|
||||
end
|
||||
UIErrorsFrame:AddMessage(msg, 1, 1, 1, 1, UIERRORS_HOLD_TIME)
|
||||
end
|
||||
end
|
||||
|
||||
function LibKeyBound.Binder:GetBindings(button)
|
||||
if button.GetBindings then
|
||||
return button:GetBindings()
|
||||
end
|
||||
|
||||
local keys
|
||||
local binding = self:ToBinding(button)
|
||||
for i = 1, select('#', GetBindingKey(binding)) do
|
||||
local hotKey = select(i, GetBindingKey(binding))
|
||||
if keys then
|
||||
keys = keys .. ', ' .. GetBindingText(hotKey, 'KEY_')
|
||||
else
|
||||
keys = GetBindingText(hotKey, 'KEY_')
|
||||
end
|
||||
end
|
||||
|
||||
return keys
|
||||
end
|
||||
|
||||
LibKeyBound.EventButton = LibKeyBound.EventButton or CreateFrame('Frame')
|
||||
do
|
||||
local EventButton = LibKeyBound.EventButton
|
||||
EventButton:UnregisterAllEvents()
|
||||
EventButton:SetScript('OnEvent', function(self, event, addon)
|
||||
if (event == 'PLAYER_REGEN_DISABLED') then
|
||||
LibKeyBound:PLAYER_REGEN_DISABLED()
|
||||
elseif (event == 'PLAYER_REGEN_ENABLED') then
|
||||
LibKeyBound:PLAYER_REGEN_ENABLED()
|
||||
elseif (event == 'PLAYER_LOGIN' and not LibKeyBound.initialized) then
|
||||
LibKeyBound:Initialize()
|
||||
EventButton:UnregisterEvent('PLAYER_LOGIN')
|
||||
end
|
||||
end)
|
||||
|
||||
if IsLoggedIn() and not LibKeyBound.initialized then
|
||||
LibKeyBound:Initialize()
|
||||
elseif not LibKeyBound.initialized then
|
||||
EventButton:RegisterEvent('PLAYER_LOGIN')
|
||||
end
|
||||
EventButton:RegisterEvent('PLAYER_REGEN_ENABLED')
|
||||
EventButton:RegisterEvent('PLAYER_REGEN_DISABLED')
|
||||
end
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
LibKeyBound-1.0 localization file
|
||||
Deutch by Gamefaq
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "deDE") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = "Tastenzuweisung Modus aktiviert";
|
||||
Disabled = "Tastenzuweisung Modus deaktiviert";
|
||||
ClearTip = format("Drücke %s um alle Tastenzuweisungen zu löschen", GetBindingText("ESCAPE", "KEY_"));
|
||||
NoKeysBoundTip = "Keine Tasten zugewiesen";
|
||||
ClearedBindings = "Entferne alle Zuweisungen von %s";
|
||||
BoundKey = "Setze %s zu %s";
|
||||
UnboundKey = "Entferne %s von %s";
|
||||
CannotBindInCombat = "Kann Tasten nicht im Kampf zuweisen";
|
||||
CombatBindingsEnabled = "Verlasse Kampf, Tastenzuweisung Modus aktiviert";
|
||||
CombatBindingsDisabled = "Beginne Kampf, Tastenzuweisung Modus deaktiviert";
|
||||
BindingsHelp = "Schwebe mit der Maus über einem Schalter. Drück dann eine Taste um sie zuzuweisen. Um die Belegung der Taste wieder zu löschen drück %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "S",
|
||||
["Shift"] = "U",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "DA",
|
||||
["Left Arrow"] = "LA",
|
||||
["Right Arrow"] = "RA",
|
||||
["Up Arrow"] = "UA",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,157 @@
|
||||
--[[
|
||||
KeyBound localization file
|
||||
English
|
||||
--]]
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundBaseLocale10 and REVISION <= LibKeyBoundBaseLocale10.BASEREVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundBaseLocale10 = {
|
||||
REVISION = 0;
|
||||
BASEREVISION = REVISION;
|
||||
BindingMode = "Binding Mode";
|
||||
Enabled = 'Bindings mode enabled';
|
||||
Disabled = 'Bindings mode disabled';
|
||||
ClearTip = format('Press %s to clear all bindings', GetBindingText('ESCAPE', 'KEY_'));
|
||||
NoKeysBoundTip = 'No current bindings';
|
||||
ClearedBindings = 'Removed all bindings from %s';
|
||||
BoundKey = 'Set %s to %s';
|
||||
UnboundKey = 'Unbound %s from %s';
|
||||
CannotBindInCombat = 'Cannot bind keys in combat';
|
||||
CombatBindingsEnabled = 'Exiting combat, keybinding mode enabled';
|
||||
CombatBindingsDisabled = 'Entering combat, keybinding mode disabled';
|
||||
BindingsHelp = "Hover over a button, then press a key to set its binding. To clear a button's current keybinding, press %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "Dn",
|
||||
["Left Arrow"] = "Lf",
|
||||
["Right Arrow"] = "Rt",
|
||||
["Up Arrow"] = "Up",
|
||||
}
|
||||
if not LibKeyBoundLocale10 then
|
||||
LibKeyBoundLocale10 = LibKeyBoundBaseLocale10
|
||||
else
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
end
|
||||
--[[
|
||||
World of Warcraft/Blizzard Interface Data (enUS)/FrameXML/GlobalStrings.lua:
|
||||
|
||||
KEY_APOSTROPHE = "'";
|
||||
KEY_BACKSLASH = "\\";
|
||||
KEY_BACKSPACE = "Backspace";
|
||||
KEY_BACKSPACE_MAC = "Delete";
|
||||
KEY_BINDING = "Key Binding";
|
||||
KEY_BINDINGS = "Key Bindings"; -- Title for the key bindings frame
|
||||
KEY_BINDINGS_MAC = "Bindings";
|
||||
KEY_BOUND = "Key Bound Successfully";
|
||||
KEY_BUTTON1 = "Left Mouse Button";
|
||||
KEY_BUTTON2 = "Right Mouse Button";
|
||||
KEY_BUTTON3 = "Middle Mouse";
|
||||
KEY_BUTTON4 = "Mouse Button 4";
|
||||
KEY_BUTTON5 = "Mouse Button 5";
|
||||
KEY_COMMA = ",";
|
||||
KEY_DELETE = "Delete";
|
||||
KEY_DELETE_MAC = "Del";
|
||||
KEY_DOWN = "Down Arrow";
|
||||
KEY_END = "End";
|
||||
KEY_HOME = "Home";
|
||||
KEY_INSERT = "Insert";
|
||||
KEY_INSERT_MAC = "Help";
|
||||
KEY_LEFT = "Left Arrow";
|
||||
KEY_LEFTBRACKET = "[";
|
||||
KEY_MINUS = "-";
|
||||
KEY_MOUSEWHEELDOWN = "Mouse Wheel Down";
|
||||
KEY_MOUSEWHEELUP = "Mouse Wheel Up";
|
||||
KEY_NUMLOCK = "Num Lock";
|
||||
KEY_NUMLOCK_MAC = "Clear";
|
||||
KEY_NUMPAD0 = "Num Pad 0";
|
||||
KEY_NUMPAD1 = "Num Pad 1";
|
||||
KEY_NUMPAD2 = "Num Pad 2";
|
||||
KEY_NUMPAD3 = "Num Pad 3";
|
||||
KEY_NUMPAD4 = "Num Pad 4";
|
||||
KEY_NUMPAD5 = "Num Pad 5";
|
||||
KEY_NUMPAD6 = "Num Pad 6";
|
||||
KEY_NUMPAD7 = "Num Pad 7";
|
||||
KEY_NUMPAD8 = "Num Pad 8";
|
||||
KEY_NUMPAD9 = "Num Pad 9";
|
||||
KEY_NUMPADDECIMAL = "Num Pad .";
|
||||
KEY_NUMPADDIVIDE = "Num Pad /";
|
||||
KEY_NUMPADMINUS = "Num Pad -";
|
||||
KEY_NUMPADMULTIPLY = "Num Pad *";
|
||||
KEY_NUMPADPLUS = "Num Pad +";
|
||||
KEY_PAGEDOWN = "Page Down";
|
||||
KEY_PAGEUP = "Page Up";
|
||||
KEY_PAUSE = "Pause";
|
||||
KEY_PAUSE_MAC = "F15";
|
||||
KEY_PERIOD = ".";
|
||||
KEY_PLUS = "+";
|
||||
KEY_PRINTSCREEN = "Print Screen";
|
||||
KEY_PRINTSCREEN_MAC = "F13";
|
||||
KEY_RIGHT = "Right Arrow";
|
||||
KEY_RIGHTBRACKET = "]";
|
||||
KEY_SCROLLLOCK = "Scroll Lock";
|
||||
KEY_SCROLLLOCK_MAC = "F14";
|
||||
KEY_SEMICOLON = ";";
|
||||
KEY_SLASH = "/";
|
||||
KEY_SPACE = "Spacebar"; -- Spacebar
|
||||
KEY_TAB = "Tab";
|
||||
KEY_TILDE = "~";
|
||||
KEY_UNBOUND_ERROR = "|cffff0000%s Function is Now Unbound!|r";
|
||||
KEY_UP = "Up Arrow";
|
||||
|
||||
KEY_ESCAPE = "Escape";
|
||||
--]]
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
LibKeyBound-1.0 localization file
|
||||
Spanish by StiviS
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "esES") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = 'Modo Atajos activado';
|
||||
Disabled = 'Modo Atajos desactivado';
|
||||
ClearTip = format('Pulsa %s para limpiar todos los atajos', GetBindingText('ESCAPE', 'KEY_'));
|
||||
NoKeysBoundTip = 'No existen atajos';
|
||||
ClearedBindings = 'Eliminados todos los atajos de %s';
|
||||
BoundKey = 'Establecer %s a %s';
|
||||
UnboundKey = 'Quitado atajo %s de %s';
|
||||
CannotBindInCombat = 'No se pueden atajar teclas en combate';
|
||||
CombatBindingsEnabled = 'Saliendo de combate, modo de Atajos de Teclado activado';
|
||||
CombatBindingsDisabled = 'Entrando en combate, modo de Atajos de Teclado desactivado';
|
||||
BindingsHelp = "Sitúese en un botón, entonces pulse una tecla para establecer su atajo. Para limpiar el Atajo del botón actual, pulse %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "Fin",
|
||||
["Home"] = "Ini",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "AW",
|
||||
["Mouse Wheel Up"] = "RW",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "AP",
|
||||
["Page Up"] = "RP",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "Ar",
|
||||
["Left Arrow"] = "Ab",
|
||||
["Right Arrow"] = "Iz",
|
||||
["Up Arrow"] = "De",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
LibKeyBound-1.0 localization file
|
||||
Latin America Spanish by ?
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "esMX") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = 'Modo Atajos activado';
|
||||
Disabled = 'Modo Atajos desactivado';
|
||||
ClearTip = format('Pulsa %s para limpiar todos los atajos', GetBindingText('ESCAPE', 'KEY_'));
|
||||
NoKeysBoundTip = 'No existen atajos';
|
||||
ClearedBindings = 'Eliminados todos los atajos de %s';
|
||||
BoundKey = 'Establecer %s a %s';
|
||||
UnboundKey = 'Quitado atajo %s de %s';
|
||||
CannotBindInCombat = 'No se pueden atajar teclas en combate';
|
||||
CombatBindingsEnabled = 'Saliendo de combate, modo de Atajos de Teclado activado';
|
||||
CombatBindingsDisabled = 'Entrando en combate, modo de Atajos de Teclado desactivado';
|
||||
BindingsHelp = "Sitúese en un botón, entonces pulse una tecla para establecer su atajo. Para limpiar el Atajo del botón actual, pulse %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "Fin",
|
||||
["Home"] = "Ini",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "AW",
|
||||
["Mouse Wheel Up"] = "RW",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "AP",
|
||||
["Page Up"] = "RP",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "Ar",
|
||||
["Left Arrow"] = "Ab",
|
||||
["Right Arrow"] = "Iz",
|
||||
["Up Arrow"] = "De",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
LibKeyBound-1.0 localization file
|
||||
French by ?
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "frFR") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = "Mode Raccourcis activé";
|
||||
Disabled = "Mode Raccourcis désactivé";
|
||||
ClearTip = format("Appuyez sur %s pour effacer tous les raccourcis", GetBindingText("ESCAPE", "KEY_"));
|
||||
NoKeysBoundTip = "Aucun raccourci";
|
||||
ClearedBindings = "Suppression de tous les raccourcis de %s";
|
||||
BoundKey = "%s associé à %s";
|
||||
UnboundKey = "%s n'est plus associé à %s";
|
||||
CannotBindInCombat = "Impossible de faire des raccourcis en combat";
|
||||
CombatBindingsEnabled = "Sortie de combat, mode Raccourcis activé";
|
||||
CombatBindingsDisabled = "Entrée en combat, mode Raccourcis désactivé";
|
||||
BindingsHelp = "Survolez un bouton, puis appuyez sur une touche pour définir son raccourci. Pour effacer le raccourci actuel d'un bouton, appuyez sur %s";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "BA",
|
||||
["Left Arrow"] = "GA",
|
||||
["Right Arrow"] = "DA",
|
||||
["Up Arrow"] = "HA",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
KeyBound localization file
|
||||
Korean by damjau
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "koKR") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = '단축키 설정 기능 사용 가능';
|
||||
Disabled = '단축키 설정 기능 사용 불가';
|
||||
ClearTip = format('%s키를 누르면 모든 단축키가 초기화됩니다', GetBindingText('ESCAPE', 'KEY_'));
|
||||
NoKeysBoundTip = '현재 단축키 없음';
|
||||
ClearedBindings = '%s의 모든 단축키가 초기화 되었습니다';
|
||||
BoundKey = '%2$s의 단축키로 %1$s|1을;를; 설정합니다.';
|
||||
UnboundKey = '%2$s에서 %1$s의 단축키가 삭제되었습니다';
|
||||
CannotBindInCombat = '전투 중에는 단축키를 지정할 수 없습니다';
|
||||
CombatBindingsEnabled = '전투 종료. 단축키 설정이 가능해집니다';
|
||||
CombatBindingsDisabled = '전투 시작. 단축키 설정이 불가능합니다';
|
||||
BindingsHelp = "버튼 위에 마우스를 올려 놓고 지정할 키를 누르세요. 버튼의 현재 단축키를 삭제하시려면 %s|1을;를; 누르세요.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "DA",
|
||||
["Left Arrow"] = "LA",
|
||||
["Right Arrow"] = "RA",
|
||||
["Up Arrow"] = "UA",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
KeyBound localization file
|
||||
Russian by ?
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "ruRU") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = 'Режим назначения клавиш включен';
|
||||
Disabled = 'Режим назначения клавиш отключен';
|
||||
ClearTip = format('Нажмите %s для сброса всех назначений', GetBindingText('ESCAPE', 'KEY_'));
|
||||
NoKeysBoundTip = 'Нет текущих назначений';
|
||||
ClearedBindings = 'Удалить все назначения с %s';
|
||||
BoundKey = 'Установить %s на %s';
|
||||
UnboundKey = 'Снять назначение %s с %s';
|
||||
CannotBindInCombat = 'Невозможно назначить клавишу в бою';
|
||||
CombatBindingsEnabled = 'Выход из боя, режим назначения клавиш включен';
|
||||
CombatBindingsDisabled = 'Начало боя, режим назначения клавиш отключен';
|
||||
BindingsHelp = "Зависните над кнопкой, и тогда нажмите клавишу для установки назначения. Для очистки текущих назначений клавиш, нажмите %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "Ц",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "КМВХ",
|
||||
["Mouse Wheel Up"] = "КМВЗ",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Прбл",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "Dn",
|
||||
["Left Arrow"] = "Lf",
|
||||
["Right Arrow"] = "Rt",
|
||||
["Up Arrow"] = "Up",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,88 @@
|
||||
--[[
|
||||
KeyBound localization file
|
||||
Chinese Simplified by ondh - http://www.ondh.cn
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "zhCN") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
BindingMode = "Binding Mode";
|
||||
Enabled = "按键绑定模式已启用";
|
||||
Disabled = "按键绑定模式已禁用";
|
||||
ClearTip = format("按 %s 清除所有绑定", GetBindingText("ESCAPE", "KEY_"));
|
||||
NoKeysBoundTip = "当前没有绑定按键";
|
||||
ClearedBindings = "从 %s 移除按键绑定";
|
||||
BoundKey = "设置 %s 到 %s";
|
||||
UnboundKey = "取消绑定 %s 从 %s";
|
||||
CannotBindInCombat = "不能在战斗状态绑定按键";
|
||||
CombatBindingsEnabled = "离开战斗状态, 按键绑定模式已启用";
|
||||
CombatBindingsDisabled = "进入战斗状态, 按键绑定模式已禁用";
|
||||
BindingsHelp = "将鼠标停留在按钮上, 然后按下欲指定快捷键之后就能绑定。 要清除目前绑定的按钮请按 %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "B1",
|
||||
["Button2"] = "B2",
|
||||
["Button3"] = "B3",
|
||||
["Button4"] = "B4",
|
||||
["Button5"] = "B5",
|
||||
["Button6"] = "B6",
|
||||
["Button7"] = "B7",
|
||||
["Button8"] = "B8",
|
||||
["Button9"] = "B9",
|
||||
["Button10"] = "B10",
|
||||
["Button11"] = "B11",
|
||||
["Button12"] = "B12",
|
||||
["Button13"] = "B13",
|
||||
["Button14"] = "B14",
|
||||
["Button15"] = "B15",
|
||||
["Button16"] = "B16",
|
||||
["Button17"] = "B17",
|
||||
["Button18"] = "B18",
|
||||
["Button19"] = "B19",
|
||||
["Button20"] = "B20",
|
||||
["Button21"] = "B21",
|
||||
["Button22"] = "B22",
|
||||
["Button23"] = "B23",
|
||||
["Button24"] = "B24",
|
||||
["Button25"] = "B25",
|
||||
["Button26"] = "B26",
|
||||
["Button27"] = "B27",
|
||||
["Button28"] = "B28",
|
||||
["Button29"] = "B29",
|
||||
["Button30"] = "B30",
|
||||
["Button31"] = "B31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "DA",
|
||||
["Left Arrow"] = "LA",
|
||||
["Right Arrow"] = "RA",
|
||||
["Up Arrow"] = "UA",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,87 @@
|
||||
--[[
|
||||
KeyBound localization file
|
||||
Traditional Chinese by ?
|
||||
--]]
|
||||
|
||||
if (GetLocale() ~= "zhTW") then
|
||||
return
|
||||
end
|
||||
|
||||
local REVISION = 90000 + tonumber(("$Revision: 92 $"):match("%d+"))
|
||||
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
|
||||
return
|
||||
end
|
||||
|
||||
LibKeyBoundLocale10 = {
|
||||
REVISION = REVISION;
|
||||
Enabled = "按鍵綁定模式已啟用";
|
||||
Disabled = "按鍵綁定模式已停用";
|
||||
ClearTip = format("按 %s 清除所有綁定", GetBindingText("ESCAPE", "KEY_"));
|
||||
NoKeysBoundTip = "目前沒有綁定按鍵";
|
||||
ClearedBindings = "從 %s 移除按鍵綁定";
|
||||
BoundKey = "設定 %s 到 %s";
|
||||
UnboundKey = "取消綁定 %s 從 %s";
|
||||
CannotBindInCombat = "無法在戰鬥狀態綁定按鍵";
|
||||
CombatBindingsEnabled = "離開戰鬥狀態, 按鍵綁定模式已啟用";
|
||||
CombatBindingsDisabled = "進入戰鬥狀態, 按鍵綁定模式已停用";
|
||||
BindingsHelp = "將滑鼠停留在按鈕上, 然後按下欲指定快捷鍵之後就能綁定。 要清除目前綁定的按鈕請按 %s.";
|
||||
|
||||
-- This is the short display version you see on the Button
|
||||
["Alt"] = "A",
|
||||
["Ctrl"] = "C",
|
||||
["Shift"] = "S",
|
||||
["NumPad"] = "N",
|
||||
|
||||
["Backspace"] = "BS",
|
||||
["Button1"] = "鼠1",
|
||||
["Button2"] = "鼠2",
|
||||
["Button3"] = "鼠3",
|
||||
["Button4"] = "鼠4",
|
||||
["Button5"] = "鼠5",
|
||||
["Button6"] = "鼠6",
|
||||
["Button7"] = "鼠7",
|
||||
["Button8"] = "鼠8",
|
||||
["Button9"] = "鼠9",
|
||||
["Button10"] = "鼠10",
|
||||
["Button11"] = "鼠11",
|
||||
["Button12"] = "鼠12",
|
||||
["Button13"] = "鼠13",
|
||||
["Button14"] = "鼠14",
|
||||
["Button15"] = "鼠15",
|
||||
["Button16"] = "鼠16",
|
||||
["Button17"] = "鼠17",
|
||||
["Button18"] = "鼠18",
|
||||
["Button19"] = "鼠19",
|
||||
["Button20"] = "鼠20",
|
||||
["Button21"] = "鼠21",
|
||||
["Button22"] = "鼠22",
|
||||
["Button23"] = "鼠23",
|
||||
["Button24"] = "鼠24",
|
||||
["Button25"] = "鼠25",
|
||||
["Button26"] = "鼠26",
|
||||
["Button27"] = "鼠27",
|
||||
["Button28"] = "鼠28",
|
||||
["Button29"] = "鼠29",
|
||||
["Button30"] = "鼠30",
|
||||
["Button31"] = "鼠31",
|
||||
["Capslock"] = "Cp",
|
||||
["Clear"] = "Cl",
|
||||
["Delete"] = "Del",
|
||||
["End"] = "En",
|
||||
["Home"] = "HM",
|
||||
["Insert"] = "Ins",
|
||||
["Mouse Wheel Down"] = "WD",
|
||||
["Mouse Wheel Up"] = "WU",
|
||||
["Num Lock"] = "NL",
|
||||
["Page Down"] = "PD",
|
||||
["Page Up"] = "PU",
|
||||
["Scroll Lock"] = "SL",
|
||||
["Spacebar"] = "Sp",
|
||||
["Tab"] = "Tb",
|
||||
|
||||
["Down Arrow"] = "下",
|
||||
["Left Arrow"] = "左",
|
||||
["Right Arrow"] = "右",
|
||||
["Up Arrow"] = "上",
|
||||
}
|
||||
setmetatable(LibKeyBoundLocale10, {__index = LibKeyBoundBaseLocale10})
|
||||
@@ -0,0 +1,13 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="Locale-deDE.lua"/>
|
||||
<Script file="Locale-enUS.lua"/>
|
||||
<Script file="Locale-esES.lua"/>
|
||||
<Script file="Locale-esMX.lua"/>
|
||||
<Script file="Locale-frFR.lua"/>
|
||||
<Script file="Locale-koKR.lua"/>
|
||||
<Script file="Locale-zhCN.lua"/>
|
||||
<Script file="Locale-zhTW.lua"/>
|
||||
<Script file="Locale-ruRU.lua"/>
|
||||
<Script file="LibKeyBound-1.0.lua"/>
|
||||
</Ui>
|
||||
Reference in New Issue
Block a user