Mercurial > wow > cyborg-mmo7
comparison CyborgMMO7.lua @ 59:b7ee4a10eaf0
Initialize the Cyborg heads as mode 1. Still display the minimap button tooltip until a mode change has been detected.
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Fri, 03 May 2013 23:24:48 +0000 |
parents | cec87b651c10 |
children | a710bedc1ec4 |
comparison
equal
deleted
inserted
replaced
58:cec87b651c10 | 59:b7ee4a10eaf0 |
---|---|
42 local EnteredWorld = false | 42 local EnteredWorld = false |
43 local BindingsLoaded = false | 43 local BindingsLoaded = false |
44 local SettingsLoaded = false | 44 local SettingsLoaded = false |
45 local SaveName = GetRealmName().."_"..UnitName("player") | 45 local SaveName = GetRealmName().."_"..UnitName("player") |
46 local Settings = nil | 46 local Settings = nil |
47 CyborgMMO_ModeDetected = false | |
47 | 48 |
48 | 49 |
49 function CyborgMMO_MiniMapButtonReposition(angle) | 50 function CyborgMMO_MiniMapButtonReposition(angle) |
50 local r = 80 | 51 local r = 80 |
51 local dx = r * math.cos(angle) | 52 local dx = r * math.cos(angle) |
388 CyborgMMO_SetMiniMapButton(Settings.MiniMapButton) | 389 CyborgMMO_SetMiniMapButton(Settings.MiniMapButton) |
389 CyborgMMO_MiniMapButtonReposition(Settings.MiniMapButtonAngle) | 390 CyborgMMO_MiniMapButtonReposition(Settings.MiniMapButtonAngle) |
390 CyborgMMO_SetCyborgHeadButton(Settings.CyborgButton) | 391 CyborgMMO_SetCyborgHeadButton(Settings.CyborgButton) |
391 CyborgMMO_SetPerSpecBindings(Settings.PerSpecBindings) | 392 CyborgMMO_SetPerSpecBindings(Settings.PerSpecBindings) |
392 | 393 |
394 -- assume we start with mode 1, it's the most likely | |
395 CyborgMMO_MouseModeChange(1) | |
396 | |
393 SettingsLoaded = true | 397 SettingsLoaded = true |
394 end | 398 end |
395 | 399 |
396 -- load data AFTER the settings, because PerSpecBindings may affect what's loaded | 400 -- load data AFTER the settings, because PerSpecBindings may affect what's loaded |
397 if not BindingsLoaded and VarsLoaded and AsyncDataLoaded and EnteredWorld then | 401 if not BindingsLoaded and VarsLoaded and AsyncDataLoaded and EnteredWorld then |
418 end | 422 end |
419 | 423 |
420 | 424 |
421 function CyborgMMO_SetupModeCallbacks(modeNum) | 425 function CyborgMMO_SetupModeCallbacks(modeNum) |
422 local fn = function() | 426 local fn = function() |
427 CyborgMMO_ModeDetected = true | |
423 CyborgMMO_MouseModeChange(modeNum) | 428 CyborgMMO_MouseModeChange(modeNum) |
424 CyborgMMO_RatPageModel:SetMode(modeNum) | 429 CyborgMMO_RatPageModel:SetMode(modeNum) |
425 end | 430 end |
426 | 431 |
427 local buttonFrame,parentFrame,name = CyborgMMO_CallbackFactory:AddCallback(fn) | 432 local buttonFrame,parentFrame,name = CyborgMMO_CallbackFactory:AddCallback(fn) |