Mercurial > wow > cyborg-mmo7
comparison OptionView.lua @ 29:e8a004a4177b
Merged the ProfileKeyBindings and WowCommands variables (they were pointing at the same value).
| author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
|---|---|
| date | Thu, 25 Apr 2013 01:31:06 +0000 |
| parents | d18ce89b6d09 |
| children | 72adde883f46 |
comparison
equal
deleted
inserted
replaced
| 28:d18ce89b6d09 | 29:e8a004a4177b |
|---|---|
| 37 index = index - 13 | 37 index = index - 13 |
| 38 end | 38 end |
| 39 local buttonStr = CyborgMMO_StringTable[("CyborgMMO_OptionPageRebindMouseRow"..index.."Name")] | 39 local buttonStr = CyborgMMO_StringTable[("CyborgMMO_OptionPageRebindMouseRow"..index.."Name")] |
| 40 | 40 |
| 41 CyborgMMO_BindingFrameButtonName:SetText(buttonStr.." Mode "..mode) | 41 CyborgMMO_BindingFrameButtonName:SetText(buttonStr.." Mode "..mode) |
| 42 CyborgMMO_BindingFrameKey:SetText(CyborgMMO_StringTable["CyborgMMO_CurrentBinding"].." "..CyborgMMO_WowCommands[CyborgMMO_GetButtonIndex(lastButton)]) | 42 CyborgMMO_BindingFrameKey:SetText(CyborgMMO_StringTable["CyborgMMO_CurrentBinding"].." "..CyborgMMO_ProfileKeyBindings[CyborgMMO_GetButtonIndex(lastButton)]) |
| 43 CyborgMMO_BindingFrame:Show() | 43 CyborgMMO_BindingFrame:Show() |
| 44 end | 44 end |
| 45 | 45 |
| 46 function CyborgMMO_SetBindingButtonText(name) | 46 function CyborgMMO_SetBindingButtonText(name) |
| 47 if not CyborgMMO_WowCommands then | 47 local binding = CyborgMMO_ProfileKeyBindings[CyborgMMO_GetButtonIndex(name)] |
| 48 CyborgMMO_LoadWowCommands() | |
| 49 end | |
| 50 | |
| 51 local binding = CyborgMMO_WowCommands[CyborgMMO_GetButtonIndex(name)] | |
| 52 getglobal(name):SetText(binding) | 48 getglobal(name):SetText(binding) |
| 53 end | 49 end |
| 54 | 50 |
| 55 function CyborgMMO_GetButtonIndex(name) | 51 function CyborgMMO_GetButtonIndex(name) |
| 56 local row,mode = name:match('Row(.)Mode(.)') | 52 local row,mode = name:match('Row(.)Mode(.)') |
| 81 function CyborgMMO_HideProfileTooltip(self) | 77 function CyborgMMO_HideProfileTooltip(self) |
| 82 GameTooltip:Hide() | 78 GameTooltip:Hide() |
| 83 end | 79 end |
| 84 | 80 |
| 85 function CyborgMMO_SetNewKeybind(keyOrButton) | 81 function CyborgMMO_SetNewKeybind(keyOrButton) |
| 86 CyborgMMO_WowCommands[CyborgMMO_GetButtonIndex(lastButton)] = keyOrButton | 82 CyborgMMO_ProfileKeyBindings[CyborgMMO_GetButtonIndex(lastButton)] = keyOrButton |
| 87 CyborgMMO_SetBindingButtonText(lastButton) | 83 CyborgMMO_SetBindingButtonText(lastButton) |
| 88 CyborgMMO_BindingFrame:Hide() | 84 CyborgMMO_BindingFrame:Hide() |
| 89 CyborgMMO_RatPageModel:LoadData() | 85 CyborgMMO_RatPageModel:LoadData() |
| 90 end | 86 end |
| 91 | 87 |
