From 7aa864c37d9e4cade91683c2c5774a8e13cc76d7 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sun, 18 Dec 2011 13:32:30 +0000 Subject: [PATCH] uses Masque instead of LibButtonFacade git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@456 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Ovale.lua | 5 ++--- Ovale.toc | 4 ++-- OvaleFrame.lua | 32 ++++++-------------------------- OvaleIcone.lua | 22 +--------------------- 4 files changed, 11 insertions(+), 52 deletions(-) diff --git a/Ovale.lua b/Ovale.lua index f79ac7a..6a7a3ae 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -2418,9 +2418,8 @@ function Ovale:ChargerDefaut() apparence = {enCombat=false, iconScale = 2, secondIconScale = 1, margin = 4, fontScale = 0.5, iconShiftX = 0, iconShiftY = 0, smallIconScale=1, raccourcis=true, numeric=false, avecCible = false, verrouille = false, vertical = false, predictif=false, highlightIcon = true, clickThru = false, - latencyCorrection=true, hideVehicule=true, flashIcon=true, targetText = "●", alpha = 1, - optionsAlpha = 1, updateInterval=0.1}, - skin = {SkinID="Blizzard", Backdrop = true, Gloss = false, Colors = {}} + latencyCorrection=true, hideVehicule=false, flashIcon=true, targetText = "●", alpha = 1, + optionsAlpha = 1, updateInterval=0.1} } }) end diff --git a/Ovale.toc b/Ovale.toc index 504911f..22ea1b1 100644 --- a/Ovale.toc +++ b/Ovale.toc @@ -3,8 +3,8 @@ ## Notes: Show the icon of the next spell to cast ## Notes-frFR: Affiche l'icône du prochain sort à lancer ## Author: Sidoine -## Version: 4.3.2 -## OptionalDeps: Ace3, ButtonFacade, Recount, Skada, LibBabble-CreatureType-3.0, LibRangeCheck-2.0 +## Version: 4.3.3 +## OptionalDeps: Ace3, Masque, Recount, Skada, LibBabble-CreatureType-3.0, LibRangeCheck-2.0 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC ## X-Category: Combat diff --git a/OvaleFrame.lua b/OvaleFrame.lua index 9207efa..59f88e2 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -1,5 +1,5 @@ local AceGUI = LibStub("AceGUI-3.0") -local LBF = LibStub("LibButtonFacade", true) +local Masque = LibStub("Masque", true) local GetTime = GetTime @@ -105,14 +105,7 @@ do self.content:SetWidth(width) self.content:SetHeight(height+50) end - - local function OnSkinChanged(self, skinID, gloss, backdrop, group, button, colors) - Ovale.db.profile.skin.SkinID = skinID - Ovale.db.profile.skin.Gloss = gloss - Ovale.db.profile.skin.Backdrop = backdrop - Ovale.db.profile.skin.Colors = colors - end - + local function GetScore(self, spellId) for k,action in pairs(self.actions) do if action.spellId == spellId then @@ -350,8 +343,8 @@ do icon:SetRangeIndicator(Ovale.db.profile.apparence.targetText) icon:EnableMouse(not Ovale.db.profile.apparence.clickThru) icon.cdShown = (l == 1) - if LBF then - icon:SetSkinGroup(self.skinGroup) + if Masque then + self.skinGroup:AddButton(icon) end if l==1 then icon:Show(); @@ -442,21 +435,8 @@ do AceGUI:RegisterAsContainer(self) - if LBF then - self.skinGroup = LBF:Group("Ovale") - if Ovale.db.profile.SkinID then - -- Import old values - Ovale.db.profile.skin.SkinID = Ovale.db.profile.SkinID - Ovale.db.profile.skin.Gloss = Ovale.db.profile.Gloss - Ovale.db.profile.skin.Backdrop = Ovale.db.profile.Backdrop - Ovale.db.profile.skin.Colors = Ovale.db.profile.Colors - Ovale.db.profile.SkinID = nil - end - self.skinGroup.SkinID = Ovale.db.profile.skin.SkinID or "Blizzard" - self.skinGroup.Gloss = Ovale.db.profile.skin.Gloss - self.skinGroup.Backdrop = Ovale.db.profile.skin.Backdrop - self.skinGroup.Colors = Ovale.db.profile.skin.Colors or {} - LBF:RegisterSkinCallback("Ovale", self.OnSkinChanged, self) + if Masque then + self.skinGroup = Masque:Group("Ovale") end return self diff --git a/OvaleIcone.lua b/OvaleIcone.lua index a1286f6..b92c677 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -1,5 +1,4 @@ -local LBF = LibStub("LibButtonFacade", true) -local L = LibStub("AceLocale-3.0"):GetLocale("Ovale") +local L = LibStub("AceLocale-3.0"):GetLocale("Ovale") local function SetValue(self, value, actionTexture) self.icone:Show() @@ -164,24 +163,6 @@ local function Update(self, element, minAttente, actionTexture, actionInRange, a return minAttente,element end -local function SetSkinGroup(self, _skinGroup) - self.skinGroup = _skinGroup - self.skinGroup:AddButton(self) -end - -local function SetSize(self, scale) --- if not LBF then --- self:SetWidth(width) --- self:SetHeight(height) --- self.normalTexture:SetWidth(width*66/36) --- self.normalTexture:SetHeight(height*66/36) --- --- self.remains:SetWidth(width) --- else - --self:SetScale(width/32) --- end -end - local function SetHelp(self, help) self.help = help end @@ -251,7 +232,6 @@ function OvaleIcone_OnLoad(self) self:RegisterForClicks("LeftButtonUp") self.SetSkinGroup = SetSkinGroup self.Update = Update - self.SetSize = SetSize self.SetHelp = SetHelp self.SetParams = SetParams self.SetFontScale = SetFontScale -- 1.7.9.5