Как вырезать с "lorti ui" покраснение панели при ''Оут офф ренж''
Вот UI как есть...
-- // Lorti UI
-- // Lorti - 2011
-----------------------------
-- INIT
-----------------------------
--get the addon namespace
local addon, ns = ...
--generate a holder for the config data
local cfg = CreateFrame("Frame")
-----------------------------
-- CONFIG
-----------------------------
MinimapBorderTop:Hide()
MinimapZoomIn:Hide()
MinimapZoomOut:Hide()
MiniMapWorldMapButton:Hide()
GameTimeFrame:Hide()
GameTimeFrame:UnregisterAllEvents()
GameTimeFrame.Show = kill
MiniMapTracking:Hide()
MiniMapTracking.Show = kill
MiniMapTracking:UnregisterAllEvents()
Minimap:EnableMouseWheel(true)
Minimap:SetScript("OnMouseWheel", function(self, z)
local c = Minimap:GetZoom()
if(z > 0 and c < 5) then
Minimap:SetZoom(c + 1)
elseif(z < 0 and c > 0) then
Minimap:SetZoom(c - 1)
end
end)
Minimap:SetScript("OnMouseUp", function(self, btn)
if btn == "RightButton" then
_G.GameTimeFrame:Click()
elseif btn == "MiddleButton" then
_G.ToggleDropDownMenu(1, nil, _G.MiniMapTrackingDropDown, self)
else
_G.Minimap_OnClick(self)
end
end)
local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1') else return v end end
hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
if not GetCVarBool("statusTextPercentage") then
if s.TextString and s.currValue then
s.TextString:SetText(f(s.currValue))
end
end
end)
local ef=CreateFrame("Frame")
ef:RegisterEvent("ADDON_LOADED")
ef:SetScript("OnEvent", function(self, event, addon)
if(addon=="Blizzard_TimeManager") then
for i,v in pairs({
PlayerFrameTexture,
TargetFrameTextureFrameTexture,
PetFrameTexture,
PartyMemberFrame1Texture,
PartyMemberFrame2Texture,
PartyMemberFrame3Texture,
PartyMemberFrame4Texture,
PartyMemberFrame1PetFrameTexture,
PartyMemberFrame2PetFrameTexture,
PartyMemberFrame3PetFrameTexture,
PartyMemberFrame4PetFrameTexture,
FocusFrameTextureFrameTexture,
TargetFrameToTTextureFrameTexture,
FocusFrameToTTextureFrameTexture,
MinimapBorder,
MiniMapMailBorder,
MiniMapBattlefieldBorder,
MiniMapLFGFrameBorder,
CastingBarFrameBorder,
FocusFrameSpellBarBorder,
TargetFrameSpellBarBorder,
select(1, TimeManagerClockButton:GetRegions()),
select(1, GameTimeFrame:GetRegions()),
}) do
v:SetVertexColor(.0, .0, .0)
end
self:UnregisterEvent("ADDON_LOADED")
ef:SetScript("OnEvent", nil)
end
end)
for i,v in pairs({
BonusActionBarFrameTexture,
BonusActionBarFrameTexture0,
BonusActionBarFrameTexture1,
BonusActionBarFrameTexture2,
BonusActionBarFrameTexture3,
BonusActionBarFrameTexture4,
MainMenuBarTexture0,
MainMenuBarTexture1,
MainMenuBarTexture2,
MainMenuBarTexture3,
MainMenuMaxLevelBar0,
MainMenuMaxLevelBar1,
MainMenuMaxLevelBar2,
MainMenuMaxLevelBar3,
MainMenuXPBarTextureLeftCap,
MainMenuXPBarTextureRightCap,
MainMenuXPBarTextureMid,
}) do
v:SetVertexColor(.4, .4, .4)
end
for i,v in pairs({
SlidingActionBarTexture0,
SlidingActionBarTexture1,
}) do
v:SetVertexColor(.4, .4, .4)
end
for i,v in pairs({
MainMenuBarLeftEndCap,
MainMenuBarRightEndCap,
}) do
v:SetVertexColor(.4, .4, .4)
end
local s = CreateFrame("Frame")
s:RegisterEvent("ADDON_LOADED")
s:SetScript("OnEvent", function(self, event, addon)
if(addon=="Blizzard_ArenaUI") then
ArenaEnemyFrame1Texture:SetVertexColor(0.1, 0.1, 0.1) ArenaEnemyFrame2Texture:SetVertexColor(0.1, 0.1, 0.1) ArenaEnemyFrame3Texture:SetVertexColor(0.1, 0.1, 0.1) ArenaEnemyFrame4Texture:SetVertexColor(0.1, 0.1, 0.1) ArenaEnemyFrame5Texture:SetVertexColor(0.1, 0.1, 0.1)
end
end)
cfg.textures = {
normal = "Interface\\AddOns\\Lorti UI\\media\\gloss",
flash = "Interface\\AddOns\\Lorti UI\\media\\flash",
hover = "Interface\\AddOns\\Lorti UI\\media\\hover",
pushed = "Interface\\AddOns\\Lorti UI\\media\\pushed",
checked = "Interface\\AddOns\\Lorti UI\\media\\checked",
equipped = "Interface\\AddOns\\Lorti UI\\media\\gloss_grey",
buttonback = "Interface\\AddOns\\Lorti UI\\media\\button_background",
buttonbackflat = "Interface\\AddOns\\Lorti UI\\media\\button_background_flat",
outer_shadow = "Interface\\AddOns\\Lorti UI\\media\\outer_shadow",
}
cfg.background = {
showbg = true, --show an background image?
showshadow = true, --show an outer shadow?
useflatbackground = false, --true uses plain flat color instead
backgroundcolor = { r = 0.3, g = 0.3, b = 0.3, a = 0.7},
shadowcolor = { r = 0, g = 0, b = 0, a = 0.9},
classcolored = false,
inset = 5,
}
cfg.color = {
normal = { r = 0, g = 0, b = 0, a = 0.9},
equipped = { r = 0.3, g = 0.55, b = 0.1},
classcolored = false,
}
cfg.hotkeys = {
show = true,
fontsize = 12,
pos1 = { a1 = "TOPRIGHT", x = 0, y = 0 },
pos2 = { a1 = "TOPLEFT", x = 0, y = 0 },
}
cfg.macroname = {
show = true,
fontsize = 12,
pos1 = { a1 = "BOTTOMLEFT", x = 0, y = 0 },
pos2 = { a1 = "BOTTOMRIGHT", x = 0, y = 0 },
}
cfg.itemcount = {
show = true,
fontsize = 12,
pos1 = { a1 = "BOTTOMRIGHT", x = 0, y = 0 },
}
cfg.cooldown = {
spacing = 0,
}
cfg.font = "Fonts\\FRIZQT__.TTF"
ns.cfg = cfg
local LortiUI = {}
local addon = LortiUI
local version = "1.6.4"
local addonName = "LUI"
addon.fontsDB = {
["Normal"] = "GameFontNormalLarge",
["Small"] = "GameFontNormal",
["Large"] = "GameFontNormalHuge",
}
UIErrorsFrame:SetAlpha(0)
USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t) CS:RegisterEvent(USD)
CS.c:SetAllPoints(CS) CS:SetPoint("TOPRIGHT",PlayerFrame,-2,-60)CS:SetSize(22,22)CS.t=CS:CreateTexture(nil,RD)CS.t:SetAllPoints()CS.t:SetTexture("Interface\\Icons\\ability_cheapshot")
CS:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==1833 then CST:SetCooldown(GetTime(),23) end if UE(select(1,...))==UE("player")and select(5,...)==408 then CST:SetCooldown(GetTime(),25)end end)
SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t) SP:RegisterEvent(USD)
SP.c:SetAllPoints(SP) SP:SetPoint("TOPRIGHT",PlayerFrame,-25,-60)SP:SetSize(22,22)SP.t=SP:CreateTexture(nil,RD)SP.t:SetAllPoints()SP.t:SetTexture("Interface\\Icons\\ability_sap")
SP:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==6770 then SAP:SetCooldown(GetTime(),27)end if UE(select(1,...))==UE("player")and select(5,...)==1776 then SAP:SetCooldown(GetTime(),23)end end)
PlayerFrame:SetScale(1.1)
TargetFrame:SetScale(1.1)
FocusFrame:SetScale(1.1)
FocusFrameSpellBar:SetScale(1.3)
PartyMemberFrame1:SetScale(1.1)
PartyMemberFrame2:SetScale(1.1)
CTT=CreateFrame("Frame")CTT:SetParent(TargetFrame)CTT:SetPoint("Left",TargetFrame,-30,5)CTT:SetSize(25,25)CTT.t=CTT:CreateTexture(nil,BORDER)CTT.t:SetAllPoints()CTT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CTT:Hide()
local function FrameOnUpdate(self) if UnitAffectingCombat("target") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CTT) end)
CFT=CreateFrame("Frame")CFT:SetParent(FocusFrame)CFT:SetPoint("Left",FocusFrame,-30,5)CFT:SetSize(25,25)CFT.t=CFT:CreateTexture(nil,BORDER)CFT.t:SetAllPoints()CFT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CFT:Hide()
local function FrameOnUpdate(self) if UnitAffectingCombat("focus") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CFT) end)