Mercurial > wow > onering3
changeset 0:54e8dbc97ee3
initial commit of onering3
author | Bryan McLemore <kaelten@gmail.com> |
---|---|
date | Fri, 17 Apr 2009 04:19:16 -0500 |
parents | |
children | b4037e0bbae1 |
files | .docmeta .hgignore .pkgmeta OneRing3.lua OneRing3.toc OneRing3.xml localization/deDE.lua localization/enUS.lua localization/esES.lua localization/esMX.lua localization/frFR.lua localization/koKR.lua localization/load.xml localization/ruRU.lua localization/zhCN.lua localization/zhTW.lua wiki/Main |
diffstat | 17 files changed, 226 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.docmeta Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,8 @@ +- + type: luadoc + input-files: "*.lua" + output-directory: API +- + type: creole + input-file: wiki/Main + output-page: "Main" \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,2 @@ +libs +.DS_Store
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.pkgmeta Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,17 @@ +package-as: OneBag3 + +externals: + libs/LibStub: svn://svn.wowace.com/wow/libstub/mainline/tags/1.0 + libs/CallbackHandler-1.0: svn://svn.wowace.com/wow/callbackhandler/mainline/tags/1.0.3/CallbackHandler-1.0 + libs/AceAddon-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0 + libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0 + libs/AceHook-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceHook-3.0 + libs/AceDB-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0 + libs/AceDBOptions-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0 + libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0 + libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0 + libs/AceGUI-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0 + libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0 + libs/OneCore-1.0: http://hg.wowace.com/wow/onecore/mainline/OneCore-1.0 + +license-output: LICENSE.txt \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OneRing3.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,82 @@ + +local OneBag3 = LibStub('AceAddon-3.0'):GetAddon('OneBag3') +local OneRing3 = LibStub('AceAddon-3.0'):NewAddon('OneRing3', 'OneCore-1.0', 'OneFrame-1.0', 'OneConfig-1.0', 'OnePlugin-1.0', 'AceHook-3.0', 'AceEvent-3.0', 'AceConsole-3.0') +local AceDB3 = LibStub('AceDB-3.0') +local L = LibStub("AceLocale-3.0"):GetLocale("OneRing3") + +OneRing3:InitializePluginSystem() + +--- Handles the do once configuration, including db, frames and configuration +function OneRing3:OnInitialize() + self.db = OneBag3.db + self.displayName = "OneRing3" + + self.bagIndexes = {-2} + self.forcedCols = 4 + + self.frame = self:CreateMainFrame("OneRingFrame") + self.frame.handler = self + + table.insert(OneBag3.frame.childrenFrames, self.frame) + + self.frame:SetPosition(self.db.profile.position) + self.frame:CustomizeFrame(self.db.profile) + + self.frame.moneyframe:Hide() + self.frame.sidebarButton:Hide() + self.frame.configButton:Hide() + + self.frame.name:ClearAllPoints() + self.frame.name:SetPoint("TOPLEFT", "OneRingFrame", "TOPLEFT", 10, -15) + + self.frame:SetScript("OnShow", function() + if not self.frame.slots then + self.frame.slots = {} + end + + self:BuildFrame() + self:OrganizeFrame() + self:UpdateFrame() + + local UpdateBag = function(event, bag) + self:UpdateBag(bag) + end + + self:RegisterEvent("BAG_UPDATE", UpdateBag) + self:RegisterEvent("BAG_UPDATE_COOLDOWN", UpdateBag) + self:RegisterEvent("UPDATE_INVENTORY_ALERTS", "UpdateFrame") + + self.frame.name:SetText(L["%s's KeyRing"]:format(UnitName("player"))) + + self.frame:ClearAllPoints() + if not OneBag3.frame:IsVisible() then + self.frame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) + else + self.frame:SetPoint("BOTTOMLEFT", OneBag3.frame, "TOPLEFT", 0, 8) + end + end) + + self.frame:SetScript("OnHide", function() + self:UnregisterEvent("BAG_UPDATE") + self:UnregisterEvent("BAG_UPDATE_COOLDOWN") + self:UnregisterEvent("UPDATE_INVENTORY_ALERTS") + end) +end + +--- Sets up hooks and registers events +function OneRing3:OnEnable() + self:SecureHook("ToggleKeyRing", function() + if self.frame:IsVisible() then + self.frame:Hide() + else + self.frame:Show() + end + + local shownContainerID = IsBagOpen(KEYRING_CONTAINER) + if ( shownContainerID ) then + local frame = getglobal("ContainerFrame"..shownContainerID) + frame:Hide() + end + end) +end + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OneRing3.toc Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,1 @@ +## Interface: 30100 ## Title: OneRing3 ## Notes: A plugin for OneBag to make your keyring the same texture as OneBag/Bank. ## Notes-zhCN: 整合背包插件,以整合方式显示你的银行。 ## Notes-zhTW: 把鑰匙圈換成 OneBag 風格。 ## Notes-deDE: Eine Tasche um sie alle zu beherrschen, und in der Dunkelheit zu binden. ## Author: Kaelten ## X-eMail: kaelten@gmail.com ## X-Category: Bags & Inventory ## X-Website: http://www.wowace.com/projects/OneRing3/ ## X-Date: @project-timestamp@ ## Version: @project-version@ ## SavedVariables: OneRing3DB ## Deps: OneBag3 ## OptionalDeps: Ace3, OneCore OneRing3.xml \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OneRing3.xml Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,4 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> + <Include file="localization\load.xml" /> + <Script file="OneRing3.lua" /> +</Ui> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/deDE.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "deDE") + +if L then + --[===[@non-debug@ + @localization(locale="deDE", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/enUS.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,5 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "enUS", true, true) + +--[===[@non-debug@ +@localization(locale="enUS", format="lua_additive_table", same-key-is-true=true)@ +--@end-non-debug@]===]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/esES.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "esES") + +if L then + --[===[@non-debug@ + @localization(locale="esES", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/esMX.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "esMX") + +if L then + --[===[@non-debug@ + @localization(locale="esMX", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/frFR.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "frFR") + +if L then + --[===[@non-debug@ + @localization(locale="frFR", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/koKR.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "koKR") + +if L then + --[===[@non-debug@ + @localization(locale="koKR", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/load.xml Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,10 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> + <Script file="enUS.lua" /> + <Script file="deDE.lua" /> + <Script file="esES.lua" /> + <Script file="frFR.lua" /> + <Script file="koKR.lua" /> + <Script file="ruRU.lua" /> + <Script file="zhCN.lua" /> + <Script file="zhTW.lua" /> +</Ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/ruRU.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "ruRU") + +if L then + --[===[@non-debug@ + @localization(locale="ruRU", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/zhCN.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "zhCN") + +if L then + --[===[@non-debug@ + @localization(locale="zhCN", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization/zhTW.lua Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,7 @@ +local L = LibStub("AceLocale-3.0"):NewLocale("OneRing3", "deDE") + +if L then + --[===[@non-debug@ + @localization(locale="deDE", format="lua_additive_table")@ + --@end-non-debug@]===] +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wiki/Main Fri Apr 17 04:19:16 2009 -0500 @@ -0,0 +1,41 @@ +**OneBag3** is the latest in a long line of bag replacements for the default game bags that will combine all of your bags into one frame. + +OneBag has a long history of minimalism and OneBag3 will continue to uphold the standard of easy of use and simplicity it's predecessors set. Like the earlier versions OneBag3 will continue to offer powerful options for those who wish to delve a little deeper. + +Also in the vein of earlier iterations I've kept to the philosophy of doing as little work as possible, as a result the code base is very small, and most of it is in the OneCore library. As of the time of writing there are only 213 lines of code unique to OneBag3, and only 981 lines of code in OneCore itself. LoC is a horrible stat in general, but it's fun none the less, and I cheat horribly since I build off the powerful [[http://www.wowace.com/projects/Ace3|Ace3 libraries]]. + +===Features +* Combines all of your bags into one. +* Customizable number of columns +* Inherent support for addons that interact with the default bags +* Color coded slots by item rarity or bag type +* Will automatically open and close for you when visiting the auction house, bank, mailbox, merchant or when trading with another player. +* Allows only certain bags to be displayed, either by slot or type +* Custom bag bar which will highlight it's associated slots on mouseover. This highlighting can be locked in place by clicking. +* Customizable scale, background color, alpha, and more. +* Clean and powerful graphical configuration + +===Future Plans +* Reintroduce the plugin system from earlier in this beta. I had to remove it due to architectural issues. +* Release OneRing3, OneView3, and OneVault3 + +===The Family +; OneCore +: The brains and the brawn of the outfit, Core does all the heavy lifting both logic and layout wise. This is embedded in OneBag by default, and you shouldn't need to worry about installing it unless you're running no-lib builds. +: [[http://www.wowace.com/projects/OneCore|On WowAce]] +: [[http://wow.curse.com/downloads/wow-addons/details/onecore.aspx|On Curse]] +; OneBank3 +: OneBag's brother who always like the safety of town, Bank does pretty much the exact same job for your bankslots as OneBag does for your character's bags. +: [[http://www.wowace.com/projects/OneBank3|On WowAce]] +: [[http://wow.curse.com/downloads/wow-addons/details/onebank3.aspx|On Curse]] +; OneRing3 +: Coming Soon(tm) +; OneView3 +: Coming Soon(tm) +; OneVault3 +: Coming Soon(tm) + +===Bug Reports & Suggestions +Please report all bug reports to [[http://www.wowace.com/projects/OneBag3/tickets|my tracker on WowAce]]. + +I want to thank all the users who've been using OneBag for so long. I'm hoping not to leave the code on autopilot quite like I did once OB2 went stable, although it was nice to not have to touch it for almost two years.