From c53551d4f345b7e51b1c1fe50d944b72ca3439d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kelly=20Crabbe=CC=81?= Date: Wed, 4 Dec 2013 09:53:00 +0100 Subject: [PATCH] beautification --- core.lua | 205 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 104 insertions(+), 101 deletions(-) mode change 100644 => 100755 core.lua diff --git a/core.lua b/core.lua old mode 100644 new mode 100755 index fb671f9..82b099c --- a/core.lua +++ b/core.lua @@ -11,6 +11,15 @@ local color = {.6, .6, .6, 1} -- uncomment and alter values for a set color ( {r, g, b, a} ) local font = "Fonts\\ARIALN.ttf" local scale = 1.1 +local backdrop = { + bgFile = "Interface\\Buttons\\WHITE8x8", + edgeFile = "Interface\\Buttons\\WHITE8x8", + tiled = true, + edgeSize = 1, + insets = { left = -1, right = -1, top = -1, bottom = -1} + } +local backdropColor = { .1,.1,.1,1 } +local borderColor = { .6,.6,.6,1 } -- Global fluff function GetMinimapShape() return "SQUARE" end @@ -19,126 +28,120 @@ function GetMinimapShape() return "SQUARE" end local LookInTehCorner = CreateFrame("Frame", "LookInTehCorner", Minimap) local frames = { - MinimapBorder, - MinimapBorderTop, - MinimapToggleButton, - MinimapZoomIn, - MinimapZoomOut, - MiniMapTrackingBackground, - MiniMapBattlefieldBorder, - MiniMapMeetingStoneFrame, - MiniMapVoiceChatFrame, - MiniMapWorldMapButton, - MiniMapMailBorder, - BattlegroundShine, - MiniMapZoneTextButton, - MiniMapLFGFrameBorder, - GameTimeFrame + MinimapBorder, + MinimapBorderTop, + MinimapToggleButton, + MinimapZoomIn, + MinimapZoomOut, + MiniMapTrackingBackground, + MiniMapBattlefieldBorder, + MiniMapMeetingStoneFrame, + MiniMapVoiceChatFrame, + MiniMapWorldMapButton, + MiniMapMailBorder, + BattlegroundShine, + MiniMapZoneTextButton, + MiniMapLFGFrameBorder, + GameTimeFrame } -- Frame fluff LookInTehCorner.PLAYER_LOGIN = function(self) - Minimap:ClearAllPoints() - Minimap:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -15, -15) - Minimap:SetMovable(true) - Minimap:SetUserPlaced(true) - Minimap:EnableMouse(true) - Minimap:RegisterForDrag("LeftButton") - Minimap:SetScript("OnDragStart", function(self) self:StartMoving() end) - Minimap:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) - Minimap:SetFrameLevel(2) - - --self:SetParent(Minimap) - self:SetAllPoints(Minimap) - self:SetWidth(Minimap:GetWidth()*scale) - self:SetHeight(Minimap:GetHeight()*scale) - self:SetFrameLevel(1) - self:SetFrameStrata("BACKGROUND") - - Minimap:SetScale(scale) - Minimap:SetMaskTexture("Interface\\ChatFrame\\ChatFrameBackground") - Minimap:SetBackdrop({bgFile = "Interface\\ChatFrame\\ChatFrameBackground", insets = { - top = -2 / scale, - left = -3 / scale, - bottom = -2 / scale, - right = -2 / scale - }}) - Minimap:SetBackdropColor(r, g, b, a) + Minimap:ClearAllPoints() + Minimap:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -15, -15) + Minimap:SetMovable(true) + Minimap:SetUserPlaced(true) + Minimap:EnableMouse(true) + Minimap:RegisterForDrag("LeftButton") + Minimap:SetScript("OnDragStart", function(self) self:StartMoving() end) + Minimap:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) + Minimap:SetFrameLevel(2) + + --self:SetParent(Minimap) + self:SetAllPoints(Minimap) + self:SetWidth(Minimap:GetWidth()*scale) + self:SetHeight(Minimap:GetHeight()*scale) + self:SetFrameLevel(1) + self:SetFrameStrata("BACKGROUND") + + Minimap:SetScale(scale) + Minimap:SetMaskTexture("Interface\\ChatFrame\\ChatFrameBackground") + Minimap:SetBackdrop(backdrop) + Minimap:SetBackdropColor(r, g, b, a) + Minimap:SetBackdropBorderColor(backdropColor.r, backdropColor.g, backdropColor.b) -- mousewheel scrolling - Minimap:EnableMouseWheel() - Minimap:SetScript("OnMouseWheel", function(self, dir) - if(dir > 0) then - Minimap_ZoomIn() - else - Minimap_ZoomOut() - end - end) + Minimap:EnableMouseWheel() + Minimap:SetScript("OnMouseWheel", function(self, dir) + if(dir > 0) then + Minimap_ZoomIn() + else + Minimap_ZoomOut() + end + end) -- Tracking menu changes - MiniMapTrackingIconOverlay:SetAlpha(0) - MiniMapTrackingButtonBorder:Hide() - MiniMapTrackingIcon:SetTexCoord(0.065, 0.935, 0.065, 0.935) - MiniMapTracking:SetParent(Minimap) - MiniMapTracking:ClearAllPoints() - MiniMapTracking:SetScale(.8) - MiniMapTracking:SetPoint("TOPLEFT", -2, 2) + MiniMapTrackingIconOverlay:SetAlpha(0) + MiniMapTrackingButtonBorder:Hide() + MiniMapTrackingIcon:SetTexCoord(0.065, 0.935, 0.065, 0.935) + MiniMapTracking:SetParent(Minimap) + MiniMapTracking:ClearAllPoints() + MiniMapTracking:SetScale(.8) + MiniMapTracking:SetPoint("TOPLEFT", -2, 2) --[[ PvP Icon - MiniMapBattlefieldFrame:SetParent(Minimap) - MiniMapBattlefieldFrame:ClearAllPoints() - MiniMapBattlefieldFrame:SetPoint("TOPRIGHT", -2, -2)]] + MiniMapBattlefieldFrame:SetParent(Minimap) + MiniMapBattlefieldFrame:ClearAllPoints() + MiniMapBattlefieldFrame:SetPoint("TOPRIGHT", -2, -2)]] -- Mail icon changes - MiniMapMailIcon:SetTexture("Interface\\AddOns\\LookInTehCorner\\media\\mail") -- remove this line if you want the default mail icon to show - MiniMapMailFrame:ClearAllPoints() - MiniMapMailFrame:SetPoint("BOTTOM", Minimap,"BOTTOM") + MiniMapMailIcon:SetTexture("Interface\\AddOns\\LookInTehCorner\\media\\mail") -- remove this line if you want the default mail icon to show + MiniMapMailFrame:ClearAllPoints() + MiniMapMailFrame:SetPoint("BOTTOM", Minimap,"BOTTOM") -- Minimap zone text stuff. - --MinimapZoneText:Hide() -- remove -- if you want to hide the ZoneText and add -- in front of the following lines. - MinimapZoneText:SetDrawLayer"OVERLAY" - MinimapZoneText:ClearAllPoints() - MinimapZoneText:SetPoint("LEFT", Minimap, 5, 0) - MinimapZoneText:SetPoint("RIGHT", Minimap, -5, 0) - MinimapZoneText:SetPoint("BOTTOM", Minimap, "TOP", 0, 5) - MinimapZoneText:SetFont(font, 11) - MinimapZoneText:SetJustifyH("CENTER") + --MinimapZoneText:Hide() -- remove -- if you want to hide the ZoneText and add -- in front of the following lines. + MinimapZoneText:SetDrawLayer"OVERLAY" + MinimapZoneText:ClearAllPoints() + MinimapZoneText:SetPoint("LEFT", Minimap, 5, 0) + MinimapZoneText:SetPoint("RIGHT", Minimap, -5, 0) + MinimapZoneText:SetPoint("BOTTOM", Minimap, "TOP", 0, 5) + MinimapZoneText:SetFont(font, 11) + MinimapZoneText:SetJustifyH("CENTER") -- World PvP Frame - if (WorldStateCaptureBar) then - WorldStateCaptureBar:ClearAllPoints() - WorldStateCaptureBar:SetPoint("TOP", UIParent, "TOP", -75, -50) - WorldStateCaptureBar.SetPoint = function() end - WorldStateCaptureBar.ClearAllPoints = function() end - end - - -- shitty 3.3 flag to move - MiniMapInstanceDifficulty:ClearAllPoints() - MiniMapInstanceDifficulty:SetParent(Minimap) - MiniMapInstanceDifficulty:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT", 0, 0) - MiniMapInstanceDifficulty:SetScale(.7) - - -- LFG Eye - MiniMapLFGFrame:ClearAllPoints() - MiniMapLFGFrame:SetParent(Minimap) - MiniMapLFGFrame:SetPoint("TOP", Minimap, 0, 0) - MiniMapLFGFrame:SetScale(1) - MiniMapLFGFrameBorder:Hide() - - --[[ Quest Watcher Frame - WatchFrame:ClearAllPoints() - WatchFrame.ClearAllPoints = function() end - WatchFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 20, -15) - WatchFrame.SetPoint = function() end - WatchFrame:SetClampedToScreen(true) + if (WorldStateCaptureBar) then + WorldStateCaptureBar:ClearAllPoints() + WorldStateCaptureBar:SetPoint("TOP", UIParent, "TOP", -75, -50) + WorldStateCaptureBar.SetPoint = function() end + WorldStateCaptureBar.ClearAllPoints = function() end + end + + -- shitty 3.3 flag to move + MiniMapInstanceDifficulty:ClearAllPoints() + MiniMapInstanceDifficulty:SetParent(Minimap) + MiniMapInstanceDifficulty:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT", 0, 0) + MiniMapInstanceDifficulty:SetScale(.7) + + -- LFG Eye + MiniMapLFGFrame:SetParent(Minimap) + MiniMapLFGFrame:SetHighlightTexture(nil) + LFDSearchStatus:SetClampedToScreen(true) + + --[[ Quest Watcher Frame + WatchFrame:ClearAllPoints() + WatchFrame.ClearAllPoints = function() end + WatchFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 20, -15) + WatchFrame.SetPoint = function() end + WatchFrame:SetClampedToScreen(true) --]] -- Frame hiding - for _, frame in pairs(frames) do - frame:Hide() - end - frames = nil + for _, frame in pairs(frames) do + frame:Hide() + end + frames = nil - self:UnregisterEvent"ADDON_LOADED" + self:UnregisterEvent"ADDON_LOADED" end -- 1.7.9.5