diff --git a/Bagnon_ItemInfo/Bagnon_ItemInfo.toc b/Bagnon_ItemInfo/Bagnon_ItemInfo.toc index 69cdbe1..9c66b0e 100644 --- a/Bagnon_ItemInfo/Bagnon_ItemInfo.toc +++ b/Bagnon_ItemInfo/Bagnon_ItemInfo.toc @@ -1,8 +1,8 @@ ## Interface: 100200 ## IconTexture: Interface\Addons\BagBrother\Art\Bagnon-Plugin.tga -## Plain Title: Bagnon ItemInfo -## Title: Bagnon |cff20ff20ItemInfo|r +## Plain Title: Bagnon ItemLevel Plus +## Title: Bagnon |cff20ff20ItemLevel|r |cffffffffPlus|r ## Notes: |cff666666By Lars Norberg|r |n|n|cffffffffA simple Bagnon plugin that displays |nthe itemlevel and bind status of your equipable gear |nand a purple eye on uncollected appearances.|r|n|n|cff4488ffPayPal|r|cffffffff:|r |n|cffffffffwww.paypal.me/GoldpawsStuff|r|n|n|cff4488ffPatreon|r|cffffffff:|r |n|cffffffffwww.patreon.com/GoldpawsStuff|r ## Version: @project-version@ ## Author: Lars Norberg diff --git a/Bagnon_ItemInfo/Bagnon_ItemInfo_Vanilla.toc b/Bagnon_ItemInfo/Bagnon_ItemInfo_Vanilla.toc index 6c3d24f..3178a41 100644 --- a/Bagnon_ItemInfo/Bagnon_ItemInfo_Vanilla.toc +++ b/Bagnon_ItemInfo/Bagnon_ItemInfo_Vanilla.toc @@ -1,6 +1,7 @@ ## Interface: 11500 -## Title: |TInterface/Addons/BagBrother/Art/Bagnon-Plugin:16:16|t Bagnon |cff20ff20ItemInfo|r +## Plain Title: Bagnon ItemLevel Plus +## Title: |TInterface/Addons/BagBrother/Art/Bagnon-Plugin:16:16|t Bagnon |cff20ff20ItemLevel|r |cffffffffPlus|r ## Notes: |cff666666By Lars Norberg|r |n|n|cffffffffA simple Bagnon plugin that displays |nthe itemlevel and bind status of your equipable gear |nand a purple eye on uncollected appearances.|r|n|n|cff4488ffPayPal|r|cffffffff:|r |n|cffffffffwww.paypal.me/GoldpawsStuff|r|n|n|cff4488ffPatreon|r|cffffffff:|r |n|cffffffffwww.patreon.com/GoldpawsStuff|r ## Version: @project-version@ ## Author: Lars Norberg diff --git a/Bagnon_ItemInfo/Bagnon_ItemInfo_Wrath.toc b/Bagnon_ItemInfo/Bagnon_ItemInfo_Wrath.toc index 1bf854e..26b0b47 100644 --- a/Bagnon_ItemInfo/Bagnon_ItemInfo_Wrath.toc +++ b/Bagnon_ItemInfo/Bagnon_ItemInfo_Wrath.toc @@ -1,6 +1,7 @@ ## Interface: 30403 -## Title: |TInterface/Addons/BagBrother/Art/Bagnon-Plugin:16:16|t Bagnon |cff20ff20ItemInfo|r +## Plain Title: Bagnon ItemLevel Plus +## Title: |TInterface/Addons/BagBrother/Art/Bagnon-Plugin:16:16|t Bagnon |cff20ff20ItemLevel|r |cffffffffPlus|r ## Notes: |cff666666By Lars Norberg|r |n|n|cffffffffA simple Bagnon plugin that displays |nthe itemlevel and bind status of your equipable gear |nand a purple eye on uncollected appearances.|r|n|n|cff4488ffPayPal|r|cffffffff:|r |n|cffffffffwww.paypal.me/GoldpawsStuff|r|n|n|cff4488ffPatreon|r|cffffffff:|r |n|cffffffffwww.patreon.com/GoldpawsStuff|r ## Version: @project-version@ ## Author: Lars Norberg diff --git a/Bagnon_ItemInfo/Defaults.lua b/Bagnon_ItemInfo/Defaults.lua index 0374fb2..2baca2e 100644 --- a/Bagnon_ItemInfo/Defaults.lua +++ b/Bagnon_ItemInfo/Defaults.lua @@ -35,6 +35,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale((...)) local AceConfigDialog = LibStub("AceConfigDialog-3.0") local AceConfigRegistry = LibStub("AceConfigRegistry-3.0") +-- Addon default settings local defaults = { enableItemLevel = true, enableItemBind = true, @@ -78,11 +79,6 @@ end local optionDB = { type = "group", args = { - --header = { - -- order = 1, - -- type = "header", - -- name = "" - --}, enableItemLevel = { order = 10, name = L["Show item levels"], @@ -164,60 +160,57 @@ local optionDB = { } } -local addonName = string.gsub(Addon, "_", " ") +local GenerateOptionsMenu = function() -AceConfigRegistry:RegisterOptionsTable(addonName, optionDB) -AceConfigDialog:SetDefaultSize(addonName, 404, 306) - -SLASH_BAGNON_ITEMLEVEL1 = "/bif" -SlashCmdList["BAGNON_ITEMLEVEL"] = function(msg) - if (not msg) then - return + -- Bagnon doesn't create its menu until opening it, + -- and we want our menu entry lister after theirs. + -- To my knowledge we can't safely resort the blizz menu. + if (not IsAddOnLoaded("Bagnon_Config")) then + LoadAddOn("Bagnon_Config") end - msg = string.gsub(msg, "^%s+", "") - msg = string.gsub(msg, "%s+$", "") - msg = string.gsub(msg, "%s+", " ") + -- Menu category listing display name + local name = [[|TInterface\Addons\BagBrother\Art\Bagnon-Plugin:16:16|t Bagnon |cffffffffilvl+|r]] - local action, element = string.split(" ", msg) - local db = BagnonItemInfo_DB + -- Menu category header + local appName = [[|TInterface\Addons\BagBrother\Art\Bagnon-Plugin:16:16|t Bagnon |cfffafafaItemLevel +|r]] - if (not action or action == "") then - if (AceConfigRegistry:GetOptionsTable(addonName)) then - AceConfigDialog:Open(addonName) - return - end - end + AceConfigRegistry:RegisterOptionsTable(appName, optionDB) - if (action == "enable") then - if (element == "itemlevel" or element == "ilvl") then - db.enableItemLevel = true - elseif (element == "boe" or element == "bind") then - db.enableItemBind = true - elseif (element == "junk" or element == "trash" or element == "garbage") then - db.enableGarbage = true - elseif (element == "eye" or element == "transmog" or element == "uncollected") then - db.enableUncollected = true - elseif (element == "color") then - db.enableRarityColoring = true - end + -- Add the options table to + -- the interface addons options. + local frame, category = AceConfigDialog:AddToBlizOptions(appName, name) - elseif (action == "disable") then - if (element == "itemlevel" or element == "ilvl") then - db.enableItemLevel = false - elseif (element == "boe" or element == "bind") then - db.enableItemBind = false - elseif (element == "junk" or element == "trash" or element == "garbage") then - db.enableGarbage = false - elseif (element == "eye" or element == "transmog" or element == "uncollected") then - db.enableUncollected = false - elseif (element == "color") then - db.enableRarityColoring = false + -- Register a slash command that + -- opens to a separate window. + local ADDON = string.upper(Addon) + + _G["SLASH_"..ADDON.."1"] = "/bil" -- same command used by Bagnon ItemLevel + _G["SLASH_"..ADDON.."2"] = "/bif" -- the old command, keeping it for compatibiliy + + -- Just open the options window, + -- don't allow configration through commands. + SlashCmdList[ADDON] = function(msg) + if (InterfaceOptionsFrame) then + InterfaceOptionsFrame:Show() + InterfaceOptionsFrame_OpenToCategory(category) + else + SettingsPanel:Show() + SettingsPanel:OpenToCategory(category) end end +end - if (Private.Forceupdate) then - Private.Forceupdate() - end +-- Don't load the menu until first time entering the world. +-- We might need to forcefully load an addon, +-- so it's important to wait until that point. +local loader = CreateFrame("Frame") +loader:RegisterEvent("PLAYER_ENTERING_WORLD") +loader:SetScript("OnEvent", function(self) -end + self:UnregisterAllEvents() + self:Hide() + + GenerateOptionsMenu() + +end) diff --git a/Bagnon_ItemInfo/Main.lua b/Bagnon_ItemInfo/Main.lua index 1f5f929..eb19f01 100644 --- a/Bagnon_ItemInfo/Main.lua +++ b/Bagnon_ItemInfo/Main.lua @@ -25,7 +25,6 @@ --]] local Addon, Private = ... if (Private.Incompatible) then - --print("|cffff1111"..Addon.." was auto-disabled.") return end diff --git a/CHANGELOG.md b/CHANGELOG.md index ef597e1..9130bed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,20 @@ -# Bagnon_ItemInfo Change Log +# Bagnon ItemLevel Plus Change Log All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.2.70-Release] 2023-12-15 +### Added +- Added our options menu to the blizzard interface options addons menu. +- Added the chat command `/bil` to directly open options menu. This does not conflict with the same chat command in the addon Bagnon ItemLevel, as that one simply does not load when this one is enabled. + +### Changed +- Rebranded the addon and its option menu entries to **Bagnon ItemLevel Plus** as this better indicates what it does. The old name "ItemInfo" was simply too generic and undescriptive. The title alone should give a good indication of what an addon does. + +### Removed +- Fully removed the old system to configure it through chat commands. The command remains, but now only and always opens the options menu window. + ## [2.1.69-Release] 2023-11-17 - Updated for WoW Client Patch 1.15.0. diff --git a/README.md b/README.md index 27b611f..09e4a62 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,26 @@ -This is a simple plugin for the addon Bagnon that shows the item level of your equipable gear, bind status of items, a purple eye on uncollected transmog appearances and desaturates and tones down vendor garbage. +This is a simple plugin for the addon Bagnon that first and foremost shows the item level of your equipable gear, but also additional information like the bind status of items (BoE, BoU), a purple eye on uncollected transmog appearances and desaturates and tones down vendor garbage. -If you don't wish to use all of the features, you can toggle them individually with the commands listed below. The settings are saved globally for all your characters. +Unlike it's similarly named sibling Bagnon ItemLevel which is mainly a straight forward one-trick pony for people only needing the item levels, this addon has an options menu and gives you far more control over the various settings. -## Chat Commands -- **/bif enable itemlevel** _- Enable the itemlevel display._ -- **/bif disable itemlevel** _- Disable the itemlevel display._ -- **/bif enable boe** _- Enable the BoE/BoU display._ -- **/bif disable boe** _- Disable the BoE/BoU display._ -- **/bif enable garbage** _- Enable the garbage desaturation._ -- **/bif disable garbage** _- Disable the garbage desaturation._ -- **/bif enable uncollected** _- Enable the uncollected appearance eye._ -- **/bif disable uncollected** _- Disable the uncollected appearance eye._ -- **/bif enable color** _- Enable rarity coloring of text._ -- **/bif disable color** _- Disable rarity coloring of text._ +## Configuration +To configure settings like whether BoE- and item levels should be rarity colored or how much darker garbage should appear, go to the **Bagnon Itemlevel Plus** entry in the blizzard interface options addons menu, or open the options menu directly in its own window with the command `/bil`. ## Downloading & Installing -I recommend downloading the addon from either CurseForge or Wago, or use their respective download clients which provides the same versions and installs them automatically for you. Be aware that only these download locations provide finished packaged addons with all libraries included. +I recommend downloading the addon from either **CurseForge** or **Wago**, or use their respective download clients which provides the same versions and installs them automatically for you. Be aware that only these download locations provide finished packaged addons with all libraries included. If you choose to download and manually install directly from GitHub, you'll have to install the following libraries as standalones in order for the UI to work: - [Ace3](https://www.curseforge.com/wow/addons/ace3) - [TaintLess](https://www.townlong-yak.com/addons/taintless) (Not on CurseForge/Wago) ## Sponsor -- GitHub: [github.com/sponsors/goldpawsstuff](https://github.com/sponsors/goldpawsstuff) +- Paypal: [paypal.me/goldpawsstuff](https://www.paypal.me/goldpawsstuff) - Patreon: [patreon.com/goldpawsstuff](https://www.patreon.com/goldpawsstuff) -- Ko-fi: [ko-fi.com/GoldpawsStuff](https://ko-fi.com/goldpawsstuff) +- GitHub: [github.com/sponsors/goldpawsstuff](https://github.com/sponsors/goldpawsstuff) - BuyMeACoffee: [buymeacoffee.com/goldpawsstuff](https://www.buymeacoffee.com/goldpawsstuff) - Liberapay: [liberapay.com/goldpawsstuff](https://liberapay.com/goldpawsstuff) -- Paypal: [paypal.me/goldpawsstuff](https://www.paypal.me/goldpawsstuff) +- Ko-fi: [ko-fi.com/GoldpawsStuff](https://ko-fi.com/goldpawsstuff) ## Connect +- X: [@goldpawsstuff](https://twitter.com/goldpawsstuff) +- YouTube: [@goldpawtube](https://www.youtube.com/@goldpawtube) - Discord: [discord.gg/RwcSm8V3Dy](https://discord.gg/RwcSm8V3Dy) -- Twitter: [@goldpawsstuff](https://twitter.com/goldpawsstuff)