annotate SkeletonKey/BindingsUI.lua @ 17:500f9b2bd9ac

- for RegisterAction, use a function table instead of that if/then rats nest - consequently pet bar actions work now - unlocalize bindings data - activate keyslot input manually instead of on mouse over - activate checkbox to keep input mode active - dynamic buttons update in real time for petaction/talent/profession spells
author Nenue
date Sat, 30 Jul 2016 00:08:00 -0400
parents cdd387d39137
children 91398d284a99
rev   line source
Nenue@6 1 -- KrakTool
Nenue@14 2 -- BindingsUI.lua
Nenue@6 3 -- Created: 7/28/2016 3:39 PM
Nenue@6 4 -- %file-revision%
Nenue@16 5 -- Code piecing the interface together
Nenue@6 6
Nenue@6 7 local kb, print = LibStub("LibKraken").register(KeyBinder, 'KeySlot')
Nenue@6 8 local BINDS_PER_ROW = 2
Nenue@17 9 local BINDING_TYPE_SPECIALIZATION = 3
Nenue@17 10 local BINDING_TYPE_CHARACTER = 2
Nenue@17 11 local BINDING_TYPE_GLOBAL = 1
Nenue@6 12 local BUTTON_HSPACING = 128
Nenue@6 13 local BUTTON_SPACING = 4
Nenue@6 14 local BUTTON_PADDING = 12
Nenue@6 15 local KEY_BUTTON_SIZE = 48
Nenue@17 16 local NUM_KEY_SLOTS = BINDS_PER_ROW * 8
Nenue@6 17 local TAB_HEIGHT = 40
Nenue@6 18
Nenue@6 19 local BINDING_SCHEME_COLOR = {
Nenue@6 20 [BINDING_TYPE_GLOBAL] = {0,.125,.5,.5},
Nenue@6 21 [BINDING_TYPE_CHARACTER] = {0,0.25,0,0.5},
Nenue@6 22 [BINDING_TYPE_SPECIALIZATION] = {.25,0,0,0.5},
Nenue@6 23 }
Nenue@6 24 local BINDING_SCHEME_VERTEX = {
Nenue@6 25 [BINDING_TYPE_GLOBAL] = {0,.5,1,1},
Nenue@6 26 [BINDING_TYPE_CHARACTER] = {0,1,0,1},
Nenue@6 27 [BINDING_TYPE_SPECIALIZATION] = {1,1,1,1},
Nenue@6 28 }
Nenue@6 29 local BINDING_SCHEME_TEXT = {
Nenue@6 30 [BINDING_TYPE_SPECIALIZATION] = {0, 1, 1},
Nenue@6 31 [BINDING_TYPE_CHARACTER] = {0, 1, 0},
Nenue@6 32 [BINDING_TYPE_GLOBAL] = {0, 1, 1}
Nenue@6 33 }
Nenue@6 34
Nenue@6 35 local restingAlpha = 0.7
Nenue@6 36 local fadeTime, fadeDelay = .30, 0.15
Nenue@6 37 local saveButton
Nenue@17 38
Nenue@17 39 local KeyButton_OnKeyDown = function(self, key)
Nenue@17 40 end
Nenue@17 41 local KeyButton_OnKeyUp = function(self, key)
Nenue@17 42 if key == 'ESCAPE' then
Nenue@17 43 kb.DeactivateSlot(kb.saveTarget)
Nenue@17 44 else
Nenue@17 45
Nenue@17 46 if key:match('[RL]SHIFT') or key:match('[RL]ALT') or key:match('[RL]CTRL') then
Nenue@17 47 return
Nenue@17 48 end
Nenue@17 49 kb.SaveSlot(kb.saveTarget, key)
Nenue@17 50
Nenue@17 51 if not kb.stickyMode then
Nenue@17 52 kb:SetScript('OnKeyUp', nil)
Nenue@17 53 kb:SetScript('OnKeyDown', nil)
Nenue@17 54 kb.saveTarget = nil
Nenue@17 55 end
Nenue@17 56 end
Nenue@17 57 kb.ui()
Nenue@6 58 end
Nenue@16 59
Nenue@6 60 local KeyButton_OnClick = function(self, click)
Nenue@6 61 print(self:GetName(), 'OnMouseDown', click)
Nenue@16 62 local cursorType = GetCursorInfo()
Nenue@6 63 if click == 'LeftButton' then
Nenue@16 64 if cursorType then
Nenue@16 65 kb.DropToSlot(self)
Nenue@16 66 else
Nenue@17 67 if IsShiftKeyDown() then
Nenue@17 68 kb.stickyMode = true
Nenue@17 69 KeyBinderStickyMode:SetChecked(true)
Nenue@17 70
Nenue@17 71 kb.saveTarget = button
Nenue@17 72 kb:SetScript('OnKeyUp', KeyButton_OnKeyUp)
Nenue@17 73 kb:SetScript('OnKeyDown', KeyButton_OnKeyDown)
Nenue@17 74 end
Nenue@17 75
Nenue@16 76 kb.ActivateSlot(self)
Nenue@17 77 kb.ui()
Nenue@16 78 end
Nenue@6 79 elseif click == 'RightButton' then
Nenue@6 80 kb.ReleaseSlot(self)
Nenue@6 81 end
Nenue@6 82 end
Nenue@6 83
Nenue@6 84 local KeyButton_OnDragStart = function(self)
Nenue@6 85 kb.PickupSlot(self)
Nenue@6 86 end
Nenue@6 87
Nenue@6 88 local KeyButton_OnReceiveDrag = function(self, ...)
Nenue@6 89 kb.DropToSlot(self)
Nenue@6 90 end
Nenue@6 91
Nenue@6 92
Nenue@6 93 local KeyBinder_OnUpdate = function(self, elapsed)
Nenue@6 94 self.elapsed = self.elapsed + elapsed
Nenue@6 95 self.throttle = self.throttle + elapsed
Nenue@6 96
Nenue@6 97 if (self.throttle >= 0.032) then
Nenue@6 98 self.throttle = 0
Nenue@6 99 else
Nenue@6 100 return
Nenue@6 101 end
Nenue@6 102
Nenue@6 103 local progress = 1
Nenue@6 104 if self.elapsed > fadeTime then
Nenue@6 105 self.elapsed = 0
Nenue@6 106 self.fadeStep = 0
Nenue@6 107 --self.statustext:SetText(nil)
Nenue@6 108 --self.bindingstext:SetText(nil)
Nenue@6 109 self:SetScript('OnUpdate', nil)
Nenue@6 110 else
Nenue@6 111 if self.elapsed < fadeDelay then
Nenue@6 112 progress = 0
Nenue@6 113 else
Nenue@6 114 self.fadeStep = self.fadeStep + 1
Nenue@6 115 progress = (self.elapsed - fadeDelay) /(fadeTime - fadeDelay)
Nenue@6 116 end
Nenue@6 117 --print(self.fadeStep, format('%.02f/%.02f', (self.elapsed - fadeDelay) ,(fadeTime - fadeDelay)) , progress)
Nenue@6 118 end
Nenue@6 119
Nenue@6 120 local alpha = 1 - progress * (1- restingAlpha)
Nenue@6 121 self.statustext:SetAlpha(alpha)
Nenue@6 122 self.bindingstext:SetAlpha(alpha)
Nenue@6 123 end
Nenue@6 124
Nenue@6 125 local KeyButton_OnUpdate = function(self)
Nenue@6 126 if not self.command then
Nenue@6 127 return
Nenue@6 128 end
Nenue@6 129
Nenue@6 130 if self:IsMouseOver() then
Nenue@6 131 kb.elapsed = 0
Nenue@6 132 if not self.active then
Nenue@6 133 -- only set this handler when the button is activated/mouseOver
Nenue@6 134 self.active = true
Nenue@6 135 kb.statustext:SetText(self.statusText .. ': '..self.actionName)
Nenue@6 136 kb.bindingstext:SetText(self.bindingText)
Nenue@6 137 kb.fadeStep = 0
Nenue@6 138 kb.throttle = 0
Nenue@6 139 kb:SetScript('OnUpdate', KeyBinder_OnUpdate)
Nenue@6 140
Nenue@6 141 end
Nenue@6 142 else
Nenue@6 143 if self.active then
Nenue@6 144 self.active = nil
Nenue@6 145 end
Nenue@6 146 end
Nenue@6 147 end
Nenue@6 148
Nenue@6 149 local KeyBinder_OnMouseWheel = function(self, delta)
Nenue@6 150 print(self, delta, self.scrollOffset, (self.scrollOffset <= 0))
Nenue@6 151
Nenue@6 152
Nenue@6 153 if IsControlKeyDown() then
Nenue@6 154 KEY_BUTTON_SIZE = KEY_BUTTON_SIZE - delta
Nenue@6 155 else
Nenue@6 156
Nenue@6 157
Nenue@6 158 if (delta > 0) and (self.scrollOffset <= 0) then
Nenue@6 159 return
Nenue@6 160 elseif delta < 0 and kb.scrollOffset >= 42 then
Nenue@6 161 return
Nenue@6 162 end
Nenue@6 163 kb.scrollOffset = ceil(kb.scrollOffset - (delta * BINDS_PER_ROW))
Nenue@6 164 end
Nenue@6 165
Nenue@17 166 for i = 1, #kb.buttons do
Nenue@17 167 kb.buttons[i]:SetSize(KEY_BUTTON_SIZE,KEY_BUTTON_SIZE)
Nenue@17 168 end
Nenue@17 169
Nenue@6 170 kb.ui(true)
Nenue@6 171 end
Nenue@6 172
Nenue@6 173 local KeyBinder_OnHide = function()
Nenue@6 174 KeyBinderImportLog:Hide()
Nenue@6 175 end
Nenue@6 176
Nenue@6 177 local CloseButton_OnClick = function()
Nenue@10 178 kb.db.showUI = false
Nenue@6 179 kb:Hide()
Nenue@6 180 end
Nenue@6 181 local CancelButton_OnClick = function()
Nenue@6 182 kb.RevertBindings()
Nenue@6 183 end
Nenue@6 184 local SaveButton_OnClick = function()
Nenue@6 185 kb.ConfirmBindings()
Nenue@6 186 end
Nenue@6 187
Nenue@17 188
Nenue@6 189 local KeyBinder_Initialize = function()
Nenue@17 190 do
Nenue@17 191 local leftSlot, upSlot
Nenue@17 192 for index = 1, NUM_KEY_SLOTS do
Nenue@17 193
Nenue@17 194 local button = CreateFrame('CheckButton', 'KeyBinderSlot'..index, kb, 'KeyButton')
Nenue@17 195 button:SetScript('OnClick', KeyButton_OnClick)
Nenue@17 196 button:SetScript('OnUpdate', KeyButton_OnUpdate)
Nenue@17 197 button:SetScript('OnDragStart', KeyButton_OnDragStart)
Nenue@17 198 button:SetScript('OnReceiveDrag', KeyButton_OnReceiveDrag)
Nenue@17 199 button:RegisterForClicks('AnyUp')
Nenue@17 200
Nenue@17 201
Nenue@17 202 local newRow = (mod(index, BINDS_PER_ROW) == 1)
Nenue@17 203
Nenue@17 204 if index == 1 then
Nenue@17 205 button:SetPoint('TOPLEFT', kb.bg, 'TOPLEFT', BUTTON_PADDING, - BUTTON_PADDING)
Nenue@17 206 upSlot = button
Nenue@17 207 elseif newRow then
Nenue@17 208 button:SetPoint('TOPLEFT', upSlot, 'BOTTOMLEFT', 0, -BUTTON_SPACING)
Nenue@17 209 upSlot = button
Nenue@17 210 else
Nenue@17 211 button:SetPoint('TOPLEFT', leftSlot, 'TOPRIGHT', BUTTON_HSPACING, 0)
Nenue@17 212 end
Nenue@17 213
Nenue@17 214 button:SetSize(KEY_BUTTON_SIZE, KEY_BUTTON_SIZE)
Nenue@17 215 button:Show()
Nenue@17 216 kb.buttons[index] = button
Nenue@17 217 leftSlot = button
Nenue@17 218 end
Nenue@17 219 end
Nenue@6 220
Nenue@6 221
Nenue@6 222 kb.scrollOffset = 0
Nenue@6 223 kb.tabAnchor = {'TOPLEFT', kb.profilebg, 'TOPLEFT', BUTTON_PADDING, -BUTTON_SPACING}
Nenue@6 224 kb.tabGrowth = {'TOPLEFT', nil,'TOPRIGHT', BUTTON_SPACING, 0}
Nenue@6 225 kb.tabSize = {TAB_HEIGHT, TAB_HEIGHT }
Nenue@6 226 kb.UIPanelAnchor = {'TOPLEFT', kb.sourcesbg, 'TOPLEFT', BUTTON_PADDING, -BUTTON_SPACING}
Nenue@6 227 kb.UIPanelGrowth = {'TOPLEFT', nil, 'BOTTOMLEFT', 0, -2 }
Nenue@6 228 kb.UIPanelSize = {84, 32 }
Nenue@6 229 kb.UIPanelIcon = {24, 32, 'LEFT', -12, 0}
Nenue@17 230 kb.controlsAnchor = {'BOTTOMRIGHT', kb.footer, -BUTTON_PADDING, BUTTON_PADDING }
Nenue@17 231 kb.controlsGrowth = {'BOTTOMRIGHT', nil, 'BOTTOMLEFT', -BUTTON_SPACING, 0}
Nenue@6 232
Nenue@6 233 -- order of these is important
Nenue@6 234 kb:tab('KeyBinderGlobalTab',
Nenue@6 235 kb.configTitle[BINDING_TYPE_GLOBAL] .. '\n' .. kb.configDescription[BINDING_TYPE_GLOBAL], "Interface\\ICONS\\item_azereansphere", {0.15,.85,.15,.85})
Nenue@6 236 kb:tab('KeyBinderCharacterTab',
Nenue@6 237 kb.configHeaders[BINDING_TYPE_CHARACTER] .. '\n' .. kb.configDescription[BINDING_TYPE_CHARACTER], nil)
Nenue@6 238 kb:tab('KeyBinderSpecTab',
Nenue@6 239 kb.configHeaders[BINDING_TYPE_SPECIALIZATION] .. '\n' .. kb.configDescription[BINDING_TYPE_SPECIALIZATION], kb.specInfo.texture)
Nenue@6 240 KeyBinderCharacterTab.icon:SetTexCoord(0.15,.85,.15,.85)
Nenue@6 241
Nenue@6 242
Nenue@6 243
Nenue@6 244 --portraitLayers[1] = KeyBinderCharacterTab.icon
Nenue@17 245 -- todo: find some generic icons for refresh/key input,etc
Nenue@6 246
Nenue@17 247 saveButton = kb:button('KeyBinderSaveButton', 'Update', 'Reload current bindings and refresh panel.', SaveButton_OnClick)
Nenue@6 248 --restoreButton = kb:button('KeyBinderRestoreButton', 'Discard', 'Revert all changes.', CancelButton_OnClick)
Nenue@6 249 --clearButton = kb:button('KeyBinderClearButton', 'Clear Page', 'Release all buttons.', ResetButton_OnClick)
Nenue@6 250
Nenue@6 251 kb:uibutton(
Nenue@6 252 'KeyBinderSpellBookButton', 'SpellBook', nil,
Nenue@6 253 function() ToggleSpellBook(BOOKTYPE_SPELL) end,
Nenue@6 254 "Interface\\BUTTONS\\UI-MicroButton-Spellbook-Up", {0, 1, .4, 1})
Nenue@6 255 kb:uibutton(
Nenue@6 256 'KeyBinderTalentFrameButton', TALENTS, SPECIALIZATION,
Nenue@6 257 function() ToggleTalentFrame() end,
Nenue@6 258 "Interface\\BUTTONS\\UI-MicroButton-Talents-Up", {0, 1, .4, 1})
Nenue@6 259
Nenue@6 260 kb:uibutton(
Nenue@6 261 'KeyBinderMacroFrameButton', 'Macros', nil,
Nenue@6 262 function() if MacroFrame and MacroFrame:IsVisible() then
Nenue@6 263 HideUIPanel(MacroFrame)
Nenue@6 264 else
Nenue@6 265 ShowMacroFrame() end
Nenue@6 266 end,
Nenue@6 267 "Interface\\BUTTONS\\UI-MicroButton-Help-Up", {0, 1, .4, 1})
Nenue@6 268
Nenue@6 269 kb:uibutton(
Nenue@6 270 'KeyBinderInventoryButton', 'Bags', nil,
Nenue@6 271 function() OpenAllBags() end,
Nenue@6 272 "Interface\\BUTTONS\\UI-MicroButtonCharacter-Up", {0, 1, .4, 1})
Nenue@6 273
Nenue@17 274 KeyBinderStickyMode:SetScript('OnClick', function(self)
Nenue@6 275
Nenue@17 276 kb.stickyMode = self:GetChecked()
Nenue@17 277 if not kb.stickyMode then
Nenue@17 278 if kb.saveTarget then
Nenue@17 279 kb.DeactivateSlot(kb.saveTarget)
Nenue@17 280 end
Nenue@17 281 end
Nenue@17 282
Nenue@17 283 kb.ui()
Nenue@17 284 end)
Nenue@6 285
Nenue@6 286 kb.info:SetPoint('TOPLEFT', kb.UIPanels[1], 'BOTTOMLEFT', 0, -BUTTON_SPACING)
Nenue@6 287 HEADER_OFFSET = kb.UIPanels[1]:GetHeight() + BUTTON_PADDING
Nenue@6 288 + kb.info:GetHeight()
Nenue@6 289 FOOTER_OFFSET = saveButton:GetHeight() + BUTTON_PADDING
Nenue@6 290
Nenue@6 291 kb:SetScript('OnHide', KeyBinder_OnHide)
Nenue@6 292 kb:SetScript('OnMouseWheel', KeyBinder_OnMouseWheel)
Nenue@6 293 kb.CloseButton:SetScript('OnClick', CloseButton_OnClick)
Nenue@6 294
Nenue@6 295 end
Nenue@6 296
Nenue@6 297
Nenue@6 298 --- Retrieves button at index; creates said button and instates any stored parameters
Nenue@6 299
Nenue@6 300
Nenue@17 301 kb.ActivateSlot = function(button)
Nenue@17 302 kb.saveTarget = button
Nenue@17 303 kb:SetScript('OnKeyUp', KeyButton_OnKeyUp)
Nenue@17 304 kb:SetScript('OnKeyDown', KeyButton_OnKeyDown)
Nenue@17 305 kb.savingText:ClearAllPoints()
Nenue@17 306 kb.savingText:SetParent(button)
Nenue@17 307 kb.savingText:SetPoint('BOTTOMLEFT', button, 'TOPLEFT', 0, 0)
Nenue@6 308 end
Nenue@6 309
Nenue@17 310 kb.DeactivateSlot = function(button)
Nenue@17 311 kb.saveTarget = nil
Nenue@17 312 kb:SetScript('OnKeyUp', nil)
Nenue@17 313 kb:SetScript('OnKeyDown', nil)
Nenue@17 314 end
Nenue@6 315
Nenue@16 316
Nenue@6 317 --- push current information into living UI
Nenue@6 318 kb.ui = function(force)
Nenue@6 319 for i, module in ipairs(kb.modules) do
Nenue@6 320 if module.ui then
Nenue@6 321 module.ui(force)
Nenue@6 322 end
Nenue@6 323 end
Nenue@6 324
Nenue@6 325 if not kb.db.showUI then
Nenue@6 326 print('---end of refresh')
Nenue@6 327 return
Nenue@6 328 end
Nenue@6 329 if not kb.loaded then
Nenue@6 330 KeyBinder_Initialize()
Nenue@6 331 kb.loaded = true
Nenue@6 332 end
Nenue@17 333 for i, button in ipairs(kb.buttons) do
Nenue@6 334 button:SetID(i+kb.scrollOffset)
Nenue@6 335 kb.UpdateSlot(button, force)
Nenue@6 336 end
Nenue@6 337
Nenue@6 338
Nenue@6 339 --- Frame Sizing
Nenue@6 340 kb.profilebg:SetHeight(kb.tabSize[2] + BUTTON_PADDING * 2 + kb.profiletext:GetStringHeight())
Nenue@6 341
Nenue@6 342 kb.bg:SetWidth((KEY_BUTTON_SIZE + BUTTON_HSPACING + BUTTON_SPACING) * BINDS_PER_ROW + BUTTON_PADDING*2 - BUTTON_SPACING)
Nenue@17 343 local numRows = NUM_KEY_SLOTS/BINDS_PER_ROW
Nenue@6 344
Nenue@6 345 kb.bg:SetHeight((KEY_BUTTON_SIZE + BUTTON_SPACING) * numRows + BUTTON_PADDING*2 - BUTTON_SPACING)
Nenue@6 346
Nenue@6 347 kb:SetHeight(kb.headerbg:GetHeight() + kb.profilebg:GetHeight() + kb.bg:GetHeight() + kb.footer:GetHeight())
Nenue@6 348 kb:SetWidth((kb.sourcesbg:GetWidth() +(BINDS_PER_ROW * (KEY_BUTTON_SIZE + BUTTON_HSPACING) + (BINDS_PER_ROW - 1) * BUTTON_SPACING + BUTTON_PADDING * 2) ))
Nenue@6 349
Nenue@17 350 if kb.saveTarget then
Nenue@17 351 kb.bg:SetColorTexture(.2,.5, .2, .5)
Nenue@17 352 kb.savingText:Show()
Nenue@17 353
Nenue@17 354 else
Nenue@17 355 kb.bg:SetColorTexture(unpack(BINDING_SCHEME_COLOR[kb.db.bindMode]))
Nenue@17 356 kb.savingText:Hide()
Nenue@17 357 end
Nenue@17 358
Nenue@6 359 for i, tab in ipairs(kb.tabButtons) do
Nenue@6 360 local border = tab:GetNormalTexture()
Nenue@6 361 local tabTexture = "Interface\\Buttons\\UI-Quickslot2"
Nenue@6 362 local left, top, right, bottom = -12, 12, 13, -13
Nenue@6 363 if i == kb.db.bindMode then
Nenue@6 364 tabTexture = "Interface\\Buttons\\CheckButtonGlow"
Nenue@6 365 left, top, right, bottom = -14, 14, 15, -15
Nenue@6 366 tab.icon:SetDesaturated(false)
Nenue@6 367 if tab.icon2 then tab.icon2:SetDesaturated(false) end
Nenue@6 368 border:SetDesaturated(true)
Nenue@6 369 border:SetVertexColor(1,1,1, 1)
Nenue@6 370 else
Nenue@6 371 tab.icon:SetDesaturated(true)
Nenue@6 372 if tab.icon2 then tab.icon2:SetDesaturated(true) end
Nenue@6 373 border:SetDesaturated(false)
Nenue@6 374 border:SetVertexColor(1,1,1)
Nenue@6 375 end
Nenue@6 376 border:SetTexture(tabTexture)
Nenue@6 377 border:SetPoint('TOPLEFT', tab, 'TOPLEFT', left, top)
Nenue@6 378 border:SetPoint('BOTTOMRIGHT', tab, 'BOTTOMRIGHT', right, bottom)
Nenue@6 379 end
Nenue@6 380
Nenue@6 381 KeyBinderSpecTab.icon:SetTexture(kb.specInfo.texture)
Nenue@12 382 SetPortraitTexture(KeyBinderCharacterTab.icon, 'player')
Nenue@6 383
Nenue@6 384 kb.profiletext:SetText(kb.configHeaders[kb.db.bindMode])
Nenue@6 385 print(kb.db.bindMode, kb.configHeaders[kb.db.bindMode], kb:GetSize())
Nenue@6 386 print(kb:GetPoint(1))
Nenue@6 387
Nenue@6 388 kb:Show()
Nenue@6 389
Nenue@17 390 if kb.saveTarget then
Nenue@17 391 KeyBinderUnbindButton:SetParent(kb.saveTarget)
Nenue@17 392 KeyBinderUnbindButton:SetPoint('TOPRIGHT', kb.saveTarget, 'TOPLEFT', -2,0)
Nenue@17 393 KeyBinderUnbindButton:Show()
Nenue@17 394 else
Nenue@17 395 KeyBinderUnbindButton:Hide()
Nenue@17 396 end
Nenue@17 397
Nenue@17 398
Nenue@6 399 -- Reset this so talent cache can be rebuilt
Nenue@6 400 kb.talentsPushed = nil
Nenue@6 401 end
Nenue@6 402
Nenue@6 403 kb.AcceptAssignment = function(self, ...)
Nenue@6 404 local popup = StaticPopupDialogs["SKELETONKEY_CONFIRM_ASSIGN_SLOT"]
Nenue@6 405 local source = loadedProfiles[popup.oldProfile]
Nenue@6 406 kb.SetSlot(popup.slot, unpack(popup.args))
Nenue@6 407 kb.UpdateSlot(popup.slot)
Nenue@6 408 kb:SetScript('OnMouseWheel', KeyBinder_OnMouseWheel) -- re-enable scrolling
Nenue@6 409 ClearCursor()
Nenue@6 410 ResetCursor()
Nenue@6 411 end