Mercurial > wow > cyborg-mmo7
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 1:a4e2eaf9cad9 | 2:08c83fa555a5 | 
|---|---|
| 28 } | 28 } | 
| 29 | 29 | 
| 30 local lastButton = nil | 30 local lastButton = nil | 
| 31 | 31 | 
| 32 function BindButton(name) | 32 function BindButton(name) | 
| 33 lastButton = name; | 33 lastButton = name | 
| 34 local index = GetButtonIndex(name) | |
| 35 local mode = 1 | |
| 36 while(index > 13) do | |
| 37 mode = mode + 1 | |
| 38 index = index - 13 | |
| 39 end | |
| 40 local buttonStr = StringTable[("MouseRow"..index.."Name")] | |
| 41 | |
| 42 getglobal("BindingFrameButtonName"):SetText(buttonStr.." Mode "..mode) | |
| 43 getglobal("BindingFrameKey"):SetText(StringTable["CurrentBinding"].." "..WowCommands[GetButtonIndex(lastButton)]) | |
| 34 BindingFrame:Show() | 44 BindingFrame:Show() | 
| 35 | 45 | 
| 36 end | 46 end | 
| 37 | 47 | 
| 38 function GetBindingButtonText(name) | 48 function GetBindingButtonText(name) | 
| 182 return; | 192 return; | 
| 183 end | 193 end | 
| 184 | 194 | 
| 185 SetNewKeybind(keyPressed) | 195 SetNewKeybind(keyPressed) | 
| 186 | 196 | 
| 187 --~ if keyPressed then | |
| 188 --~ BindPadCore.keyPressed = keyPressed | |
| 189 --~ local oldAction = GetBindingAction(keyPressed) | |
| 190 --~ | |
| 191 --~ local keyText = BindPadCore.GetBindingText(keyPressed, "KEY_"); | |
| 192 --~ if oldAction~="" and oldAction ~= BindPadCore.selectedSlot.action then | |
| 193 --~ if StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] == nil then | |
| 194 --~ StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"] = { | |
| 195 --~ button1 = YES, | |
| 196 --~ button2 = NO, | |
| 197 --~ timeout = 0, | |
| 198 --~ hideOnEscape = 1, | |
| 199 --~ OnAccept = BindPadBindFrame_SetBindKey, | |
| 200 --~ OnCancel = BindPadBindFrame_Update, | |
| 201 --~ whileDead = 1 | |
| 202 --~ } | |
| 203 --~ end | |
| 204 --~ StaticPopupDialogs["BINDPAD_CONFIRM_BINDING"].text = format(BINDPAD_TEXT_CONFIRM_BINDING, keyText, oldAction, keyText, BindPadCore.selectedSlot.action); | |
| 205 --~ StaticPopup_Show("BINDPAD_CONFIRM_BINDING") | |
| 206 --~ else | |
| 207 --~ BindPadBindFrame_SetBindKey(); | |
| 208 --~ end | |
| 209 --~ end | |
| 210 end | 197 end | 
