Mercurial > wow > inventory
diff Core.lua @ 11:10a2244f7ff0
Renamed addon from Inventory to Inventorium.
author | Zerotorescue |
---|---|
date | Tue, 12 Oct 2010 02:11:23 +0200 |
parents | c4d0e5d47e10 |
children | 5006cb0e97c6 |
line wrap: on
line diff
--- a/Core.lua Tue Oct 12 02:08:37 2010 +0200 +++ b/Core.lua Tue Oct 12 02:11:23 2010 +0200 @@ -1,5 +1,5 @@ --- You can access this addon's object through: LibStub("AceAddon-3.0"):GetAddon("Inventory") -local addon = LibStub("AceAddon-3.0"):NewAddon("Inventory", "AceEvent-3.0"); +-- You can access this addon's object through: LibStub("AceAddon-3.0"):GetAddon("Inventorium") +local addon = LibStub("AceAddon-3.0"):NewAddon("Inventorium", "AceEvent-3.0"); local AceGUI = LibStub("AceGUI-3.0"); @@ -56,18 +56,18 @@ }; -- Register our saved variables database - self.db = LibStub("AceDB-3.0"):New("InventoryDB", defaults, true); + self.db = LibStub("AceDB-3.0"):New("InventoriumDB", defaults, true); -- SLASH COMMANDS -- Disable the AddonLoader slash commands - SLASH_INVENTORY1 = nil; + SLASH_INVENTORIUM1 = nil; SLASH_IY1 = nil; -- Register our own slash commands - SLASH_INVENTORY1 = "/inventory"; - SLASH_INVENTORY2 = "/iy"; - SlashCmdList["INVENTORY"] = function(msg) + SLASH_INVENTORIUM1 = "/inventorium"; + SLASH_INVENTORIUM2 = "/im"; + SlashCmdList["INVENTORIUM"] = function(msg) self:CommandHandler(msg); end @@ -75,13 +75,13 @@ -- Attempt to remove the interface options added by AddonLoader (if enabled) if AddonLoader and AddonLoader.RemoveInterfaceOptions then - AddonLoader:RemoveInterfaceOptions("Inventory"); + AddonLoader:RemoveInterfaceOptions("Inventorium"); end -- Now create our own options frame local frame = CreateFrame("Frame", nil, UIParent); frame:Hide(); - frame.name = "Inventory"; + frame.name = "Inventorium"; frame:HookScript("OnShow", function(self) -- Refresh the frame to instantly show the right options InterfaceOptionsFrame_OpenToCategory(self.name) @@ -298,7 +298,7 @@ elseif slashArgs[cmd] then slashArgs[cmd](); else - print("Wrong command, available: /inventory config (or /iy c) and /inventory summary (or /iy s)"); + print("Wrong command, available: /inventorium config (or /im c) and /inventorium summary (or /im s)"); end end @@ -310,30 +310,30 @@ AceConfigDialog = LibStub("AceConfigDialog-3.0"); AceConfigRegistry = LibStub("AceConfigRegistry-3.0"); -- Register options table - LibStub("AceConfig-3.0"):RegisterOptionsTable("InventoryOptions", options); + LibStub("AceConfig-3.0"):RegisterOptionsTable("InventoriumOptions", options); -- Set a nice default size (so that 4 normal sized elements fit next to eachother) - AceConfigDialog:SetDefaultSize("InventoryOptions", 975, 600); + AceConfigDialog:SetDefaultSize("InventoriumOptions", 975, 600); -- In case the addon is loaded from another condition, always call the remove interface options if AddonLoader and AddonLoader.RemoveInterfaceOptions then - AddonLoader:RemoveInterfaceOptions("Inventory"); + AddonLoader:RemoveInterfaceOptions("Inventorium"); end -- Add to the blizzard addons options thing - --AceConfigDialog:AddToBlizOptions("InventoryOptions"); + --AceConfigDialog:AddToBlizOptions("InventoriumOptions"); end end function addon:Show() self:Load(); - AceConfigDialog:Open("InventoryOptions"); + AceConfigDialog:Open("InventoriumOptions"); end function addon:FillOptions() options = { type = "group", - name = "Inventory", + name = "Inventorium", childGroups = "tree", args = { }, @@ -410,7 +410,7 @@ order = 100, type = "group", name = "General", - desc = "Change general Inventory settings.", + desc = "Change general Inventorium settings.", args = { general = { order = 0, @@ -783,7 +783,7 @@ addon.db.global.groups[groupName].items[itemId] = true; -- Now rebuild the list - AceConfigRegistry:NotifyChange("InventoryOptions"); + AceConfigRegistry:NotifyChange("InventoriumOptions"); return true; end @@ -833,7 +833,7 @@ addon.db.global.groups[groupName].items[itemId] = nil; -- Now rebuild the list - AceConfigRegistry:NotifyChange("InventoryOptions"); + AceConfigRegistry:NotifyChange("InventoriumOptions"); end end, width = "double",