From 19d2905388c03960a6b23cab963379bf1c338b73 Mon Sep 17 00:00:00 2001 From: pschifferer Date: Sun, 25 Oct 2009 13:24:40 +0000 Subject: [PATCH] Changed version numbers for the addon to just correspond to revisions in the repository. This is simpler than trying to track 1.x, 2.0, etc. Added colorization to the shopping list: the item shows in green if the character has it in their inventory, blue-green if the character has at least *some* of the item, purple if the character has the item in their bank, and some other color (>.>) if the item is in the mail (NYI). --- Cauldron.toc | 6 +++--- CauldronMain.lua | 2 +- CauldronMainUI.lua | 9 +++++++-- CauldronShoppingListUI.lua | 24 ++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Cauldron.toc b/Cauldron.toc index 07bd220..efb2e48 100755 --- a/Cauldron.toc +++ b/Cauldron.toc @@ -1,10 +1,10 @@ -## Interface: 30100 +## Interface: 30200 ## Title: Cauldron |cff7fff7f -Ace3-|r -## Version: 1.0.0.rc2.@project-revision@ +## Version: @project-revision@ ## Author: Caendra of Silver Hand ## Notes: An improved interface for your trade skills ## RequiredDeps: -## OptionalDeps: Ace3, LibStub, LibDataBroker-1.1 +## OptionalDeps: LibStub, AceAddon-3.0, AceEvent-3.0, AceTimer-3.0, AceConsole-3.0, AceHook-3.0, LibLogger-1.0, LibDataBroker-1.1 ## SavedVariables: CauldronDB ## SavedVariablesPerCharacter: ## DefaultState: enabled diff --git a/CauldronMain.lua b/CauldronMain.lua index 51aaf5f..d26253e 100644 --- a/CauldronMain.lua +++ b/CauldronMain.lua @@ -4,7 +4,7 @@ Cauldron = LibStub("AceAddon-3.0"):NewAddon("Cauldron", "AceEvent-3.0", "AceTimer-3.0", "AceConsole-3.0", "AceHook-3.0", "LibLogger-1.0"); local L = LibStub("AceLocale-3.0"):GetLocale("Cauldron"); -Cauldron.version = "1.0.0.rc2.@project-revision@"; +Cauldron.version = "@project-revision@"; Cauldron.date = string.sub("$Date$", 8, 17); -- key binding names diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua index 817f345..f68c7af 100644 --- a/CauldronMainUI.lua +++ b/CauldronMainUI.lua @@ -33,10 +33,15 @@ function Cauldron:Frame_Show() Cauldron.vars.origFrameLevel = TradeSkillFrame:GetFrameLevel(); TradeSkillFrame:SetAlpha(0); - TradeSkillFrame:ClearAllPoints(); - TradeSkillFrame:SetPoint("TOPLEFT", 0, 900); +-- TradeSkillFrame:ClearAllPoints(); +-- TradeSkillFrame:SetPoint("TOPLEFT", 0, 900); TradeSkillFrame:SetFrameStrata("BACKGROUND"); TradeSkillFrame:SetFrameLevel(1); + TradeSkillFrame:SetWidth(692); + + -- remove the tradeskill frame from the special frame list + + -- set the tradeskill frame's width to match ours end self:RegisterMessage("Cauldron_Update", "OnCauldronUpdate"); diff --git a/CauldronShoppingListUI.lua b/CauldronShoppingListUI.lua index 99d1763..4ccf92f 100644 --- a/CauldronShoppingListUI.lua +++ b/CauldronShoppingListUI.lua @@ -143,6 +143,30 @@ function Cauldron:UpdateShoppingList() shoppingListItem:Show(); + -- figure out if the current toon has the item, and color it appropriately + local counts = Cauldron:ReagentCount(item); + if counts then + local color = { r=1.0, g=1.0, b=1.0 }; + + if counts.total > 0 then + -- the current toon has at least 1 of the item + color = { r=0.0, g=1.0, b=1.0 }; + + if counts.has >= amount then + -- toon has all of them in inventory + color = { r=0.0, g=1.0, b=0.0 }; + elseif counts.bank > 0 then + -- toon has some of them in bank + color = { r=1.0, g=0.0, b=1.0 }; + elseif counts.mail > 0 then + -- toon has some in the mail + color = { r=1.0, g=1.0, b=0.0 }; + end + end + + _G["CauldronShoppingListItem"..itemIndex.."Item"]:SetTextColor(color.r, color.g, color.b, 1.0); + end + frameAbove = shoppingListItem; itemIndex = itemIndex + 1; -- 1.7.9.5