Mercurial > wow > cyborg-mmo7
diff OptionView.lua @ 2:08c83fa555a5
Updated the popup strings
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Wed, 23 May 2012 10:58:25 +0000 |
parents | a4e2eaf9cad9 |
children | d186f8cd5000 |
line wrap: on
line diff
--- a/OptionView.lua Wed May 23 08:26:07 2012 +0000 +++ b/OptionView.lua Wed May 23 10:58:25 2012 +0000 @@ -30,7 +30,17 @@ local lastButton = nil function BindButton(name) - lastButton = name; + lastButton = name + local index = GetButtonIndex(name) + local mode = 1 + while(index > 13) do + mode = mode + 1 + index = index - 13 + end + local buttonStr = StringTable[("MouseRow"..index.."Name")] + + getglobal("BindingFrameButtonName"):SetText(buttonStr.." Mode "..mode) + getglobal("BindingFrameKey"):SetText(StringTable["CurrentBinding"].." "..WowCommands[GetButtonIndex(lastButton)]) BindingFrame:Show() end @@ -184,27 +194,4 @@ SetNewKeybind(keyPressed) ---~ if keyPressed then ---~ BindPadCore.keyPressed = keyPressed ---~ local oldAction = GetBindingAction(keyPressed) ---~ ---~ local keyText = BindPadCore.GetBindingText(keyPressed, "KEY_"); ---~ if oldAction~="" and oldAction ~= BindPadCore.selectedSlot.action then ---~ if StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] == nil then ---~ StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] = { ---~ button1 = YES, ---~ button2 = NO, ---~ timeout = 0, ---~ hideOnEscape = 1, ---~ OnAccept = BindPadBindFrame_SetBindKey, ---~ OnCancel = BindPadBindFrame_Update, ---~ whileDead = 1 ---~ } ---~ end ---~ StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"].text = format(BINDPAD_TEXT_CONFIRM_BINDING, keyText, oldAction, keyText, BindPadCore.selectedSlot.action); ---~ StaticPopup_Show("BINDPAD_CONFIRM_BINDING") ---~ else ---~ BindPadBindFrame_SetBindKey(); ---~ end ---~ end end