diff --git a/BagSync.toc b/BagSync.toc index 83a524d..2b7959b 100644 --- a/BagSync.toc +++ b/BagSync.toc @@ -2,7 +2,7 @@ ## Title: BagSync ## Notes: BagSync tracks your characters items and displays it within tooltips. ## Author: Xruptor -## Version: 6.4 +## Version: 6.5 ## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB localization\localization.lua diff --git a/BagSync_Minimap.lua b/BagSync_Minimap.lua index 4eae3c2..f6422f4 100644 --- a/BagSync_Minimap.lua +++ b/BagSync_Minimap.lua @@ -1,6 +1,8 @@ --Minimap Button for BagSync --So people can stop PESTERING me about a dang button, why can't they just use DataBroker sheesh +local L = BAGSYNC_L + local bgMinimapButton = CreateFrame("Frame","BagSync_MinimapButton", Minimap) bgMinimapButton:SetHeight(32) @@ -19,6 +21,51 @@ bgMinimapButtonTexture:SetHeight(32) bgMinimapButtonTexture:SetTexture('Interface\\AddOns\\BagSync\\media\\minimap.tga') bgMinimapButtonTexture:SetPoint('CENTER') +--lets do the dropdown menu of DOOM +local bgsMinimapDD = CreateFrame("Frame", "bgsMinimapDD") +bgsMinimapDD.displayMode = 'MENU' + +local function addButton(level, text, isTitle, notCheckable, hasArrow, value, func) + local info = UIDropDownMenu_CreateInfo() + info.text = text + info.isTitle = isTitle + info.notCheckable = notCheckable + info.hasArrow = hasArrow + info.value = value + info.func = func + UIDropDownMenu_AddButton(info, level) +end + +bgsMinimapDD.initialize = function(self, level) + + if level == 1 then + PlaySound('gsTitleOptionExit') + addButton(level, 'BagSync ', 1, 1) + addButton(level, L["Search"], nil, 1, nil, 'search', function(frame, ...) + if BagSync_SearchFrame then BagSync_SearchFrame:Show() end + end) + addButton(level, L["Tokens"], nil, 1, nil, 'tokens', function(frame, ...) + if BagSync_TokensFrame then BagSync_TokensFrame:Show() end + end) + addButton(level, L["Profiles"], nil, 1, nil, 'profiles', function(frame, ...) + if BagSync_ProfilesFrame then BagSync_ProfilesFrame:Show() end + end) + addButton(level, L["Gold"], nil, 1, nil, 'gold', function(frame, ...) + if BagSync then BagSync:ShowMoneyTooltip() end + end) + addButton(level, L["FixDB"], nil, 1, nil, 'fixdb', function(frame, ...) + if BagSync then BagSync:FixDB_Data() end + end) + addButton(level, L["Config"], nil, 1, nil, 'config', function(frame, ...) + InterfaceOptionsFrame_OpenToCategory("BagSync") + end) + addButton(level, "", nil, 1) --space ;) + addButton(level, L["Close"], nil, 1) + + end + +end + bgMinimapButton:SetScript('OnMouseUp', function(self, button) if button == 'LeftButton' and BagSync_SearchFrame then if BagSync_SearchFrame:IsVisible() then @@ -27,11 +74,7 @@ bgMinimapButton:SetScript('OnMouseUp', function(self, button) BagSync_SearchFrame:Show() end elseif button == 'RightButton' and BagSync_TokensFrame then - if BagSync_TokensFrame:IsVisible() then - BagSync_TokensFrame:Hide() - else - BagSync_TokensFrame:Show() - end + ToggleDropDownMenu(1, nil, bgsMinimapDD, 'cursor', 0, 0) end end) diff --git a/localization/localization.lua b/localization/localization.lua index c0a5a64..0778bb7 100644 --- a/localization/localization.lua +++ b/localization/localization.lua @@ -12,6 +12,10 @@ -- ["Total:"] = "", -- ["Tokens"] = "", -- ["Profiles"] = "", +-- ["Gold"] = "", +-- ["Close"] = "", +-- ["FixDB"] = "", +-- ["Config"] = "", -- ["Select a profile to delete.\nNOTE: This is irreversible!"] = "", -- ["Delete"] = "", -- ["Confirm"] = "", @@ -21,18 +25,14 @@ -- ["A FixDB has been performed on BagSync! The database is now optimized!"] = "", -- ["ON"] = "", -- ["OFF"] = "", +-- ----THESE ARE FOR SLASH COMMANDS -- ["[itemname]"] = "", -- ["search"] = "", -- ["gold"] = "", -- ["tokens"] = "", --- ["profiles"] = "", -- ["fixdb"] = "", --- ["total"] = "", --- ["guildname"] = "", --- ["throttle"] = "", --- ["guild"] = "", --- ["mailbox"] = "", --- ["unitclass"] = "", +-- ["profiles"] = "", +-- ---------------------- -- ["/bgs [itemname] - Does a quick search for an item"] = "", -- ["/bgs search - Opens the search window"] = "", -- ["/bgs gold - Displays a tooltip with the amount of gold on each character."] = "",