Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --oUF_Senit 2012--
- --Gets Namespace
- local addon, ns = ...
- --Gets Config
- local config = ns.config
- --Gets Library
- local lib = ns.lib
- --STYLE FUNCTIONS--
- --Sub Function
- local SubFunc = function(self)
- self:SetSize(self.width, self.height)
- self.menu = lib.menu
- self:RegisterForClicks("AnyUp")
- self:SetAttribute("*type2", "menu")
- self:SetScript("OnEnter", UnitFrame_OnEnter)
- self:SetScript("OnLeave", UnitFrame_OnLeave)
- --local unitBackground = self:CreateTexture(nil, "ARTWORK")
- --unitBackground:SetAllPoints(self)
- --unitBackground:SetTexture(0, 0, 0, 1)
- lib.gen_hpbar(self)
- end
- local function CreatePlayer(self)
- --Unit Specific Style
- self.mystyle = "player"
- --Size
- self.width = 225
- self.height = 15
- --Generate Bars and Text
- SubFunc(self)
- lib.gen_ppbar(self)
- lib.gen_castbar(self)
- lib.pla_fontstrings(self)
- lib.cps_fontstrings(self)
- --Style Specific
- self.Health.Smooth = true
- self.Health.frequentUpdates = true
- self.Health.colorHealth = true
- self.colors.health = {20/255, 20/255, 20/255}
- self.Health.bg.multiplier = 8
- --self.Power.colorPower = true
- --self.colors.power["ENERGY"] = {255/255, 50/255, 37/255}
- self.Power.colorClass = true
- self.Power.Smooth = true
- self.Power.frequentUpdates = true
- self.Power.bg.multiplier = 0.3
- --lib.createDebuffs(self)
- lib.bufftracker(self)
- --lib.debufftracker(self)
- --lib.playBuffs(self)
- end
- local function CreateTarget(self)
- --Unit Specific Style
- self.mystyle = "target"
- --Size
- self.width = 225
- self.height = 15
- --Generate Bars and Text
- SubFunc(self)
- lib.gen_ppbar(self)
- lib.gen_castbar(self)
- lib.tar_fontstrings(self)
- --Style Specific
- self.Health.frequentUpdates = true
- self.Health.Smooth = true
- self.Health.colorTapping = true
- self.Health.colorDisconnected = true
- self.Health.colorHealth = true
- self.Health.bg.multiplier = 8
- --self.Power.PostUpdate = PostUpdate
- self.Power.Smooth = true
- self.Power.colorReaction = true
- self.Power.colorClass = true
- self.Power.frequentUpdates = true
- self.Power.bg.multiplier = 0.3
- lib.createBuffs(self)
- --lib.createDebuffs(self)
- lib.debufftracker(self)
- end
- local function CreateTargetTarget(self)
- --Unit Specific Style
- self.mystle = "targettarget"
- --Size
- self.width = 150
- self.height = 15
- --Generate Bars and Text
- SubFunc(self)
- lib.gen_ppbar(self)
- lib.tot_fontstrings(self)
- --Style Specific
- self.Health.frequentUpdates = true
- self.Health.Smooth = true
- self.Health.colorTapping = true
- self.Health.colorDisconnected = true
- self.Health.colorHealth = true
- self.Health.bg.multiplier = 8
- self.Power.Smooth = true
- self.Power.colorReaction = true
- self.Power.colorClass = true
- self.Power.frequentUpdates = true
- self.Power.bg.multiplier = 0.3
- end
- local function CreateFocus(self)
- --Unit Specific Style
- self.mystle = "focus"
- --Size
- self.width = 150
- self.height = 15
- --Generate Bars and Text
- SubFunc(self)
- lib.gen_ppbar(self)
- lib.tot_fontstrings(self)
- --Style Specific
- self.Health.frequentUpdates = true
- self.Health.Smooth = true
- self.Health.colorTapping = true
- self.Health.colorDisconnected = true
- self.Health.colorHealth = true
- self.Health.bg.multiplier = 8
- self.Power.Smooth = true
- self.Power.colorReaction = true
- self.Power.colorClass = true
- self.Power.frequentUpdates = true
- self.Power.bg.multiplier = 0.3
- end
- local function CreateRaid(self)
- --Unit Specific Style
- self.mystle = "raid"
- --Size
- self.width = 41
- self.height = 15
- self.Range = {
- insideAlpha = 1,
- outsideAlpha = .3,
- }
- --Generate Bars and Text
- SubFunc(self)
- lib.gen_ppbar2(self)
- lib.raid_fontstrings(self)
- self.Health.PostUpdate = lib.PostUpdateRaidFrame
- --Style Specific
- self.Health.Smooth = true
- self.Health.colorTapping = true
- self.Health.colorDisconnected = true
- self.Health.colorHealth = true
- self.Health.bg.multiplier = 8
- self.Power.colorClass = true
- self.Power.bg.multiplier = 0.3
- end
- --UNIT SPAWN--
- --Registers Styles
- oUF:RegisterStyle("oUF_Senit_Player", CreatePlayer)
- oUF:RegisterStyle("oUF_Senit_Target", CreateTarget)
- oUF:RegisterStyle("oUF_Senit_TargetTarget", CreateTargetTarget)
- oUF:RegisterStyle("oUF_Senit_Focus", CreateFocus)
- oUF:RegisterStyle("oUF_Senit_Raid", CreateRaid)
- oUF:SetActiveStyle("oUF_Senit_Player")
- --Spawns Player
- local player = oUF:Spawn("player", "oUF_player")
- player:SetPoint("CENTER", UIParent, "CENTER", 0, -190)
- oUF:SetActiveStyle("oUF_Senit_Target")
- --Spawns Target
- local target = oUF:Spawn("target", "oUF_target")
- target:SetPoint("CENTER", UIParent, "CENTER", 235, -190)
- oUF:SetActiveStyle("oUF_Senit_TargetTarget")
- --Spawns Target's Target
- local target = oUF:Spawn("targettarget", "oUF_targettarget")
- target:SetPoint("CENTER", UIParent, "CENTER", -198, -190)
- oUF:SetActiveStyle("oUF_Senit_Focus")
- --Spawns Focus
- local focus = oUF:Spawn("focus", "oUF_focus")
- focus:SetPoint("CENTER", UIParent, "CENTER", 470, 0)
- oUF:SetActiveStyle("oUF_Senit_Raid")
- --Spawns Raid
- local maxGroups = 5
- local raid = oUF:SpawnHeader("oUF_Raid", nil, "custom [@raid1,exists] show; [group:party,nogroup:raid] show; hide",
- "showPlayer", true,
- "showSolo", false,
- "showParty", true,
- "showRaid", true,
- "yOffset", 0,
- "xoffset", 15,
- "groupFilter", "1,2,3,4,5,6,7,8",
- "groupBy", "GROUP",
- "groupingOrder", "1,2,3,4,5,6,7,8",
- "sortMethod", "INDEX",
- "maxColumns", maxGroups,
- "unitsPerColumn", 5,
- "columnSpacing", 15,
- "point", "LEFT",
- "columnAnchorPoint", "TOP",
- "oUF-initialConfigFunction", [[
- self:SetHeight(25)
- self:SetWidth(100)
- ]])
- raid:SetPoint("TOPLEFT", UIParent, 850, -300)
- --DIE RAID PANEL
- CompactRaidFrameManager:UnregisterAllEvents()
- CompactRaidFrameManager.Show = CompactRaidFrameManager.Hide
- CompactRaidFrameManager:Hide()
- CompactRaidFrameContainer:UnregisterAllEvents()
- CompactRaidFrameContainer.Show = CompactRaidFrameContainer.Hide
- CompactRaidFrameContainer:Hide()
- --DIE BOSS FRAMES
- function hideBossFrames()
- for i = 1, 4 do
- local frame = _G["Boss"..i.."TargetFrame"]
- frame:UnregisterAllEvents()
- frame:Hide()
- frame.Show = function () end
- end
- end
- -- Call the hide function
- hideBossFrames()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement