Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------
- -- Allaidia Zone Text
- ---------------------
- -- Background
- ZoneBackground = CreateFrame("Frame", "ZoneBackground", UIParent)
- TukuiDB.CreatePanel(ZoneBackground, TukuiDB.Scale(120), TukuiDB.Scale(18), "TOP", UIParent, "TOP", 0, TukuiDB.Scale(-10))
- ZoneBackground:SetFrameLevel(2)
- ZoneBackground:SetBackdropColor(.075,.075,.075,.7)
- ZoneBackground:SetBackdropBorderColor(unpack(TukuiCF["media"].bordercolor))
- HydraDB.SetBorder(ZoneBackground)
- TukuiDB.CreateShadow(ZoneBackground)
- -- Invisible Frame to toggle
- ZoneToggle = CreateFrame("Frame", "ZoneToggle", UIParent)
- TukuiDB.CreatePanel(ZoneToggle, TukuiDB.Scale(120), TukuiDB.Scale(18), "CENTER", ZoneBackground, "CENTER", 0, 0)
- ZoneToggle:SetAlpha(0)
- ZoneToggle:SetFrameStrata("HIGH")
- ZoneToggle:EnableMouse(true)
- AnimGroup(ZoneBackground, 0, TukuiDB.Scale(30), 0.4)
- ZoneToggle:SetScript("OnMouseDown", function(self)
- if not ZoneBackground:IsVisible() then
- SlideIn(ZoneBackground)
- else
- SlideOut(ZoneBackground)
- end
- end)
- -- Text
- local TukuiZone = CreateFrame("Frame")
- ZoneText = ZoneBackground:CreateFontString(nil, "LOW")
- ZoneText:SetFont(TukuiCF.media.font, 12)
- ZoneText:SetPoint("CENTER", ZoneBackground, 0, 0)
- ZoneText:SetShadowColor(0, 0, 0)
- ZoneText:SetShadowOffset(1.25, -1.25)
- -- Update / Set Text
- local function ZoneUpdate(self)
- if GetMinimapZoneText() == "Putricide's Laboratory of Alchemical Horrors and Fun" then
- ZoneText:SetText(hexa.."Putricide's Laboratory"..hexb)
- else
- ZoneText:SetText(hexa..GetMinimapZoneText()..hexb)
- end
- ZoneBackground:SetWidth(ZoneText:GetWidth() + TukuiDB.Scale(16))
- end
- TukuiZone:SetScript("OnUpdate", ZoneUpdate)
- ZoneUpdate(TukuiZone, 10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement