# HG changeset patch # User Chris Mellon # Date 1310610632 18000 # Node ID c4324144d380295c713e177e32322025a5baab76 # Parent c67355a1ec401e7fd1362d05bcdcb268325aaab2 start adding configuration - options to toggle consolidated buff support. pkgmeta and embeds updates for the extra libs diff -r c67355a1ec40 -r c4324144d380 .pkgmeta --- a/.pkgmeta Wed Jun 29 09:02:24 2011 -0500 +++ b/.pkgmeta Wed Jul 13 21:30:32 2011 -0500 @@ -8,6 +8,12 @@ url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0 libs/AceConsole-3.0: url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0 + libs/AceDB-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0 + libs/AceConfig-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0 + libs/AceDBOptions-3.0: + url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0 libs/AceAddon-3.0: url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0 libs/LibGratuity-3.0: diff -r c67355a1ec40 -r c4324144d380 KBF.lua --- a/KBF.lua Wed Jun 29 09:02:24 2011 -0500 +++ b/KBF.lua Wed Jul 13 21:30:32 2011 -0500 @@ -6,15 +6,12 @@ function kbf:OnInitialize() + -- config settings - account wide shared profile by default + self.db = LibStub("AceDB-3.0"):New("KBFSavedVars", self.defaultConfig, true) -- create frames here so that they will be correctly stored in location cache by -- the UI. self.anchor, self.secureHeader, self.consolidateHeader, self.consolidateProxy = self:CreateCoreFrames() self.debuffFrames = {} - local defaultSettings = { - -- global bar settings - -- overrides for buffs - -- overrides for debuffs - } self:RegisterEvent("UNIT_AURA") self:RegisterEvent("UNIT_ENTERING_VEHICLE", "PollForVehicleChange") self:RegisterEvent("UNIT_EXITING_VEHICLE", "PollForVehicleChange") @@ -391,8 +388,8 @@ local texture = "Interface\\TargetingFrame\\UI-StatusBar" -- Because of secureframe suckiness, these height & width numbers -- have to be consistent with the stuff in KBF.xml - local height = 16 - local width = 200 -- this is the width *without* the icon + local height = self.staticConfig.BAR_HEIGHT + local width = self.staticConfig.BAR_WIDTH -- this is the width *without* the icon local font, _, style = GameFontHighlight:GetFont() local r = r or 0 local g = g or 1 @@ -405,8 +402,8 @@ local timertextcolor = {1, 1, 1, 1} if not frame then frame = CreateFrame("Button", nil, UIParent) -- the "top level" frame that represents the bar as a whole - frame:SetHeight(16) - frame:SetWidth(200 + 16) + frame:SetHeight(height) + frame:SetWidth(width + height) end local bar = frame bar.icon = CreateFrame("Button", nil, bar) -- the icon @@ -464,11 +461,13 @@ function kbf:CreateCoreFrames() -- this is the visible anchor frame that the user interacts with -- to move the buffs around + local height = self.staticConfig.BAR_HEIGHT + local width = self.staticConfig.BAR_WIDTH -- this is the width *without* the icon local anchor = CreateFrame("FRAME", "KBFAnchorFrame", UIParent) anchor:SetClampedToScreen(true) anchor:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", - tile = true, tileSize = 16, edgeSize = 12, + tile = true, tileSize = height, edgeSize = 12, insets = { left = 4, right = 4, top = 4, bottom = 4 }, }) local text = anchor:CreateFontString(nil, "OVERLAY") -- the label text @@ -477,8 +476,8 @@ text:SetPoint("TOPLEFT", anchor, "TOPLEFT", 0, 0) text:SetPoint("BOTTOMRIGHT", anchor, "BOTTOMRIGHT", 0, 0) text:SetText("KBF ANCHOR") - anchor:SetWidth(200 +16) - anchor:SetHeight(16) + anchor:SetWidth(height + width) + anchor:SetHeight(height) -- movability anchor:EnableMouse(true) anchor:SetMovable(true) @@ -492,7 +491,9 @@ local secureHeader = CreateFrame("FRAME", "KBFBuffFrame", UIParent, "SecureAuraHeaderTemplate") self:SetCommonSecureHeaderAttributes(secureHeader) - secureHeader:SetAttribute("consolidateTo", 99) + if self.db.profile.consolidateBuffs then + secureHeader:SetAttribute("consolidateTo", 99) + end secureHeader:SetPoint("TOP", anchor, "TOP", 0, 0) -- this is the "button" in the aura flow that represents the consolidated buffs. @@ -522,8 +523,8 @@ -- position it relative to the proxy, so it can appear where we want it consolidateHeader:SetPoint("TOPRIGHT", anchor, "TOPLEFT", 0, 0) - consolidateHeader:SetWidth(200 +16) - consolidateHeader:SetHeight(16) + consolidateHeader:SetWidth(height + width) + consolidateHeader:SetHeight(height) consolidateHeader:Show() return anchor, secureHeader, consolidateHeader, consolidateProxy diff -r c67355a1ec40 -r c4324144d380 KBF.toc --- a/KBF.toc Wed Jun 29 09:02:24 2011 -0500 +++ b/KBF.toc Wed Jul 13 21:30:32 2011 -0500 @@ -3,9 +3,12 @@ ## Notes: Cata-compatible buff frames ## Author: Kaylen ## OptionalDeps: Ace3, LibGratuity-3.0, LibStub, AceEvent-3.0, AceConsole-3.0 +## SavedVars: KBFSavedVars +config.lua embeds.xml KBF.xml KBF.lua + diff -r c67355a1ec40 -r c4324144d380 README --- a/README Wed Jun 29 09:02:24 2011 -0500 +++ b/README Wed Jul 13 21:30:32 2011 -0500 @@ -7,6 +7,8 @@ Left click on a buff to remove it. Weapon enchant support. Vehicle swap support (Out of combat only) + Fancy weapon enchant tooltips - for supported weapon enchants (please open a ticket if your favorites are missing), + you get a tooltip showing the weapon name and the enchant info, rather than the default weapon tooltip. Issues/flaws: @@ -17,7 +19,7 @@ Condition (b) is a consequence of the blizzard secure aura system not supporting vehicles. Weapon enchants: Weapon enchants will always be shown at the top of the buff list. - Any enchant on your thrown weapon will not be shown. This is a bug in the blizzard secure aura system. + The enchant on your thrown weapon will be shown, but will be inoperable. If you apply an enchant to your off-hand in-combat and then try to remove it before you have left combat, it will remove your main hand enchant instead. This is due to a bug in the blizzrd secure aura system which I can only work around out of combat. @@ -29,5 +31,4 @@ between the small set of options permited by the blizzard buff system. Sizeing: - The size and shape of the bars cannot be changed, due to limitations in the blizzard code. - In the future, you may be able to change the scaling of the bars. \ No newline at end of file + The size and shape of the bars cannot be changed, due to limitations in the blizzard code. \ No newline at end of file diff -r c67355a1ec40 -r c4324144d380 config.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.lua Wed Jul 13 21:30:32 2011 -0500 @@ -0,0 +1,14 @@ +local _, kbf = ... + +-- These are the static options which can't be displayed/used by in-game configs +kbf.staticConfig = {} +kbf.staticConfig.BAR_HEIGHT = 16 -- note that you do have to update this in the XML as well if you change it +kbf.staticConfig.BAR_WIDTH = 200 -- otherwise the hitbox for clicking off a buff won't be the same size as the displayed buff bar + + +-- default profile options +kbf.defaultConfig = { + profile = { + ["consolidateBuffs"] = true, + } +} \ No newline at end of file diff -r c67355a1ec40 -r c4324144d380 embeds.xml --- a/embeds.xml Wed Jun 29 09:02:24 2011 -0500 +++ b/embeds.xml Wed Jul 13 21:30:32 2011 -0500 @@ -5,6 +5,9 @@ + + +