Mercurial > wow > cyborg-mmo7
comparison CyborgMMO7.lua @ 46:3a3dc5e4405a
Removed a level of frames for the minimap button, and improved some widgets naming a bit.
| author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
|---|---|
| date | Mon, 29 Apr 2013 17:44:58 +0000 |
| parents | 57d46de51ba7 |
| children | 40892c6b6075 |
comparison
equal
deleted
inserted
replaced
| 45:57d46de51ba7 | 46:3a3dc5e4405a |
|---|---|
| 40 | 40 |
| 41 function CyborgMMO_MiniMapButtonReposition(angle) | 41 function CyborgMMO_MiniMapButtonReposition(angle) |
| 42 local r = 80 | 42 local r = 80 |
| 43 local dx = r * math.cos(angle) | 43 local dx = r * math.cos(angle) |
| 44 local dy = r * math.sin(angle) | 44 local dy = r * math.sin(angle) |
| 45 CyborgMMO_MiniMapFrame:ClearAllPoints() | 45 CyborgMMO_MiniMapButton:ClearAllPoints() |
| 46 CyborgMMO_MiniMapFrame:SetPoint("CENTER", "Minimap", "CENTER", dx, dy) | 46 CyborgMMO_MiniMapButton:SetPoint("CENTER", "Minimap", "CENTER", dx, dy) |
| 47 end | 47 end |
| 48 | 48 |
| 49 | 49 |
| 50 function CyborgMMO_MiniMapButtonOnUpdate() | 50 function CyborgMMO_MiniMapButtonOnUpdate() |
| 51 local xpos,ypos = GetCursorPosition() | 51 local xpos,ypos = GetCursorPosition() |
| 57 local angle = math.atan2(ypos, xpos) | 57 local angle = math.atan2(ypos, xpos) |
| 58 CyborgMMO_MiniMapButtonReposition(angle) | 58 CyborgMMO_MiniMapButtonReposition(angle) |
| 59 end | 59 end |
| 60 | 60 |
| 61 function CyborgMMO_MouseModeChange(mode) | 61 function CyborgMMO_MouseModeChange(mode) |
| 62 local MiniMapTexture = getglobal("CyborgMMO_MiniMapFrameButton_Icon") | 62 local MiniMapTexture = CyborgMMO_MiniMapButtonIcon |
| 63 local MiniMapGlowTexture = getglobal("CyborgMMO_MiniMapFrameButton_IconGlow") | 63 local MiniMapGlowTexture = CyborgMMO_MiniMapButtonIconGlow |
| 64 local OpenButtonTexture = getglobal("CyborgMMO_OpenButtonPage".."OpenMainForm"):GetNormalTexture() | 64 local OpenButtonTexture = getglobal("CyborgMMO_OpenButtonPage".."OpenMainForm"):GetNormalTexture() |
| 65 local OpenButtonGlowTexture = getglobal("CyborgMMO_OpenButtonPage".."OpenMainForm"):GetHighlightTexture() | 65 local OpenButtonGlowTexture = getglobal("CyborgMMO_OpenButtonPage".."OpenMainForm"):GetHighlightTexture() |
| 66 if mode == 1 then | 66 if mode == 1 then |
| 67 MiniMapTexture:SetVertexColor(1,0,0,1) | 67 MiniMapTexture:SetVertexColor(1,0,0,1) |
| 68 MiniMapGlowTexture:SetVertexColor(1,0.26,0.26,.75) | 68 MiniMapGlowTexture:SetVertexColor(1,0.26,0.26,.75) |
| 454 end | 454 end |
| 455 end | 455 end |
| 456 | 456 |
| 457 function CyborgMMO_SetMiniMapButton(visible) | 457 function CyborgMMO_SetMiniMapButton(visible) |
| 458 if visible then | 458 if visible then |
| 459 CyborgMMO_MiniMapFrameButton:Show() | 459 CyborgMMO_MiniMapButton:Show() |
| 460 else | 460 else |
| 461 CyborgMMO_MiniMapFrameButton:Hide() | 461 CyborgMMO_MiniMapButton:Hide() |
| 462 end | 462 end |
| 463 CyborgMMO_OptionPageMiniMapButton:SetChecked(visible) | 463 CyborgMMO_OptionPageMiniMapButton:SetChecked(visible) |
| 464 if SettingsLoaded then | 464 if SettingsLoaded then |
| 465 Settings.MiniMapButton = visible | 465 Settings.MiniMapButton = visible |
| 466 end | 466 end |
