Skip to content

Commit

Permalink
Immersion : new add
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowDi committed Aug 7, 2017
1 parent 6a2c79c commit 5f1f67f
Show file tree
Hide file tree
Showing 64 changed files with 15,099 additions and 0 deletions.
445 changes: 445 additions & 0 deletions Interface/AddOns/Immersion/Config.lua

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions Interface/AddOns/Immersion/Extras.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
local _, L = ...
local PT = 'Interface\\AddOns\\' .. _ .. "\\Textures\\"

function L.MixinNormal(object, ...)
for i = 1, select("#", ...) do
local mixin = select(i, ...)
for k, v in pairs(mixin) do
object[k] = v
end
end

return object
end

function L.Mixin(t, ...)
t = L.MixinNormal(t, ...)
if t.HasScript then
for k, v in pairs(t) do
if t:HasScript(k) then
if t:GetScript(k) then
t:HookScript(k, v)
else
t:SetScript(k, v)
end
end
end
end
end

function L.HideFrame(frame)
frame:UnregisterAllEvents()
frame:SetSize(0, 0)
frame:EnableMouse(false)
frame:EnableKeyboard(false)
frame:SetAlpha(0)
frame:ClearAllPoints()
end

----------------------------------
-- Shared media / mixins
----------------------------------
L.Backdrops = {
GOSSIP_HILITE = {
edgeFile = PT..'Edge_Gossip_Hilite.blp',
edgeSize = 8,
insets = {left = 5, right = 5, top = 5, bottom = 6}
},
TALKBOX = {
bgFile = PT..'Backdrop_Talkbox.blp',
edgeFile = PT..'Edge_Talkbox_BG.blp',
edgeSize = 32,
insets = { left = 32, right = 32, top = 32, bottom = 32 }
},
TOOLTIP_BG = {
bgFile = PT..'Backdrop_Talkbox.blp',
edgeFile = PT..'Edge_Talkbox_BG.blp',
edgeSize = 8,
insets = { left = 8, right = 8, top = 8, bottom = 8 }
},
}
Loading

0 comments on commit 5f1f67f

Please sign in to comment.