├── .vscode └── settings.json ├── Core.lua ├── HelloAce.toc ├── LICENSE ├── Libs ├── Ace3.lua ├── Ace3.toc ├── AceAddon-3.0 │ ├── AceAddon-3.0.lua │ └── AceAddon-3.0.xml ├── AceBucket-3.0 │ ├── AceBucket-3.0.lua │ └── AceBucket-3.0.xml ├── AceComm-3.0 │ ├── AceComm-3.0.lua │ ├── AceComm-3.0.xml │ └── ChatThrottleLib.lua ├── AceConfig-3.0 │ ├── AceConfig-3.0.lua │ ├── AceConfig-3.0.xml │ ├── AceConfigCmd-3.0 │ │ ├── AceConfigCmd-3.0.lua │ │ └── AceConfigCmd-3.0.xml │ ├── AceConfigDialog-3.0 │ │ ├── AceConfigDialog-3.0.lua │ │ └── AceConfigDialog-3.0.xml │ └── AceConfigRegistry-3.0 │ │ ├── AceConfigRegistry-3.0.lua │ │ └── AceConfigRegistry-3.0.xml ├── AceConsole-3.0 │ ├── AceConsole-3.0.lua │ └── AceConsole-3.0.xml ├── AceDB-3.0 │ ├── AceDB-3.0.lua │ └── AceDB-3.0.xml ├── AceDBOptions-3.0 │ ├── AceDBOptions-3.0.lua │ └── AceDBOptions-3.0.xml ├── AceEvent-3.0 │ ├── AceEvent-3.0.lua │ └── AceEvent-3.0.xml ├── AceGUI-3.0 │ ├── AceGUI-3.0.lua │ ├── AceGUI-3.0.xml │ └── widgets │ │ ├── AceGUIContainer-BlizOptionsGroup.lua │ │ ├── AceGUIContainer-DropDownGroup.lua │ │ ├── AceGUIContainer-Frame.lua │ │ ├── AceGUIContainer-InlineGroup.lua │ │ ├── AceGUIContainer-ScrollFrame.lua │ │ ├── AceGUIContainer-SimpleGroup.lua │ │ ├── AceGUIContainer-TabGroup.lua │ │ ├── AceGUIContainer-TreeGroup.lua │ │ ├── AceGUIContainer-Window.lua │ │ ├── AceGUIWidget-Button.lua │ │ ├── AceGUIWidget-CheckBox.lua │ │ ├── AceGUIWidget-ColorPicker.lua │ │ ├── AceGUIWidget-DropDown-Items.lua │ │ ├── AceGUIWidget-DropDown.lua │ │ ├── AceGUIWidget-EditBox.lua │ │ ├── AceGUIWidget-Heading.lua │ │ ├── AceGUIWidget-Icon.lua │ │ ├── AceGUIWidget-InteractiveLabel.lua │ │ ├── AceGUIWidget-Keybinding.lua │ │ ├── AceGUIWidget-Label.lua │ │ ├── AceGUIWidget-MultiLineEditBox.lua │ │ └── AceGUIWidget-Slider.lua ├── AceHook-3.0 │ ├── AceHook-3.0.lua │ └── AceHook-3.0.xml ├── AceLocale-3.0 │ ├── AceLocale-3.0.lua │ └── AceLocale-3.0.xml ├── AceSerializer-3.0 │ ├── AceSerializer-3.0.lua │ └── AceSerializer-3.0.xml ├── AceTab-3.0 │ ├── AceTab-3.0.lua │ └── AceTab-3.0.xml ├── AceTimer-3.0 │ ├── AceTimer-3.0.lua │ └── AceTimer-3.0.xml ├── Bindings.xml ├── CHANGES.txt ├── CallbackHandler-1.0 │ ├── CallbackHandler-1.0.lua │ └── CallbackHandler-1.0.xml ├── LICENSE.txt ├── LibStub │ └── LibStub.lua ├── README.md └── changelog.txt ├── Options.lua ├── README.md └── preview.png /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Lua.runtime.version": "Lua 5.1", 3 | "Lua.runtime.builtin": { 4 | "basic": "disable", 5 | "debug": "disable", 6 | "io": "disable", 7 | "math": "disable", 8 | "os": "disable", 9 | "package": "disable", 10 | "string": "disable", 11 | "table": "disable", 12 | "utf8": "disable" 13 | }, 14 | "Lua.workspace.library": [ 15 | "~\\.vscode\\extensions\\ketho.wow-api-0.20.5\\Annotations\\Core" 16 | ], 17 | "Lua.workspace.ignoreDir": [ 18 | "Libs" 19 | ], 20 | "Lua.diagnostics.globals": [ 21 | "Settings" 22 | ] 23 | } -------------------------------------------------------------------------------- /Core.lua: -------------------------------------------------------------------------------- 1 | HelloAce = LibStub("AceAddon-3.0"):NewAddon("HelloAce", "AceEvent-3.0", "AceConsole-3.0") 2 | local AC = LibStub("AceConfig-3.0") 3 | local ACD = LibStub("AceConfigDialog-3.0") 4 | 5 | function HelloAce:OnInitialize() 6 | -- uses the "Default" profile instead of character-specific profiles 7 | -- https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0 8 | self.db = LibStub("AceDB-3.0"):New("HelloAceDB", self.defaults, true) 9 | 10 | -- registers an options table and adds it to the Blizzard options window 11 | -- https://www.wowace.com/projects/ace3/pages/api/ace-config-3-0 12 | AC:RegisterOptionsTable("HelloAce_Options", self.options) 13 | self.optionsFrame = ACD:AddToBlizOptions("HelloAce_Options", "HelloAce (label 1)") 14 | 15 | -- adds a child options table, in this case our profiles panel 16 | local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db) 17 | AC:RegisterOptionsTable("HelloAce_Profiles", profiles) 18 | ACD:AddToBlizOptions("HelloAce_Profiles", "Profiles", "HelloAce (label 1)") 19 | 20 | -- https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0 21 | self:RegisterChatCommand("ha", "SlashCommand") 22 | self:RegisterChatCommand("helloace", "SlashCommand") 23 | 24 | self:GetCharacterInfo() 25 | end 26 | 27 | function HelloAce:OnEnable() 28 | self:RegisterEvent("PLAYER_STARTED_MOVING") 29 | self:RegisterEvent("CHAT_MSG_CHANNEL") 30 | end 31 | 32 | function HelloAce:PLAYER_STARTED_MOVING(event) 33 | print(event) 34 | end 35 | 36 | function HelloAce:CHAT_MSG_CHANNEL(event, text, ...) 37 | print(event, text, ...) 38 | end 39 | 40 | function HelloAce:GetCharacterInfo() 41 | -- stores character-specific data 42 | self.db.char.level = UnitLevel("player") 43 | end 44 | 45 | function HelloAce:SlashCommand(input, editbox) 46 | if input == "enable" then 47 | self:Enable() 48 | self:Print("Enabled.") 49 | elseif input == "disable" then 50 | -- unregisters all events and calls HelloAce:OnDisable() if you defined that 51 | self:Disable() 52 | self:Print("Disabled.") 53 | elseif input == "message" then 54 | print("this is our saved message:", self.db.profile.someInput) 55 | else 56 | self:Print("Some useful help message.") 57 | Settings.OpenToCategory(self.optionsFrame.name) 58 | --[[ or as a standalone window 59 | if ACD.OpenFrames["HelloAce_Options"] then 60 | ACD:Close("HelloAce_Options") 61 | else 62 | ACD:Open("HelloAce_Options") 63 | end 64 | ]] 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /HelloAce.toc: -------------------------------------------------------------------------------- 1 | ## Interface: 110007 2 | ## Version: 1.0.2 3 | ## Title: Hello Ace 4 | ## Notes: Minimal example (with Ace3 libs hard embedded) 5 | ## Author: Ketho 6 | ## SavedVariables: HelloAceDB 7 | ## OptionalDeps: Ace3 # if a user wants to run Ace3 standalone 8 | 9 | Libs\LibStub\LibStub.lua 10 | Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml 11 | Libs\AceAddon-3.0\AceAddon-3.0.xml 12 | Libs\AceEvent-3.0\AceEvent-3.0.xml 13 | Libs\AceTimer-3.0\AceTimer-3.0.xml 14 | Libs\AceBucket-3.0\AceBucket-3.0.xml 15 | Libs\AceHook-3.0\AceHook-3.0.xml 16 | Libs\AceDB-3.0\AceDB-3.0.xml 17 | Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml 18 | Libs\AceLocale-3.0\AceLocale-3.0.xml 19 | Libs\AceConsole-3.0\AceConsole-3.0.xml 20 | Libs\AceGUI-3.0\AceGUI-3.0.xml 21 | Libs\AceConfig-3.0\AceConfig-3.0.xml 22 | Libs\AceComm-3.0\AceComm-3.0.xml 23 | Libs\AceTab-3.0\AceTab-3.0.xml 24 | Libs\AceSerializer-3.0\AceSerializer-3.0.xml 25 | 26 | Core.lua 27 | Options.lua 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Libs/Ace3.lua: -------------------------------------------------------------------------------- 1 | 2 | -- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess 3 | -- for now only /rl to reload your UI :) 4 | -- note the complete overkill use of AceAddon and console, ain't it cool? 5 | 6 | -- GLOBALS: next, loadstring, ReloadUI, geterrorhandler 7 | -- GLOBALS: BINDING_HEADER_ACE3, BINDING_NAME_RELOADUI, Ace3, LibStub 8 | 9 | -- BINDINGs labels 10 | BINDING_HEADER_ACE3 = "Ace3" 11 | BINDING_NAME_RELOADUI = "ReloadUI" 12 | -- 13 | 14 | local gui = LibStub("AceGUI-3.0") 15 | local reg = LibStub("AceConfigRegistry-3.0") 16 | local dialog = LibStub("AceConfigDialog-3.0") 17 | 18 | Ace3 = LibStub("AceAddon-3.0"):NewAddon("Ace3", "AceConsole-3.0") 19 | local Ace3 = Ace3 20 | 21 | local selectedgroup 22 | local frame 23 | local select 24 | local status = {} 25 | local configs = {} 26 | 27 | local function frameOnClose() 28 | gui:Release(frame) 29 | frame = nil 30 | end 31 | 32 | local function RefreshConfigs() 33 | for name in reg:IterateOptionsTables() do 34 | configs[name] = name 35 | end 36 | end 37 | 38 | local function ConfigSelected(widget, event, value) 39 | selectedgroup = value 40 | dialog:Open(value, widget) 41 | end 42 | 43 | local old_CloseSpecialWindows 44 | 45 | -- GLOBALS: CloseSpecialWindows, next 46 | function Ace3:Open() 47 | if not old_CloseSpecialWindows then 48 | old_CloseSpecialWindows = CloseSpecialWindows 49 | CloseSpecialWindows = function() 50 | local found = old_CloseSpecialWindows() 51 | if frame then 52 | frame:Hide() 53 | return true 54 | end 55 | return found 56 | end 57 | end 58 | RefreshConfigs() 59 | if next(configs) == nil then 60 | self:Print("No Configs are Registered") 61 | return 62 | end 63 | 64 | if not frame then 65 | frame = gui:Create("Frame") 66 | frame:ReleaseChildren() 67 | frame:SetTitle("Ace3 Options") 68 | frame:SetLayout("FILL") 69 | frame:SetCallback("OnClose", frameOnClose) 70 | 71 | select = gui:Create("DropdownGroup") 72 | select:SetGroupList(configs) 73 | select:SetCallback("OnGroupSelected", ConfigSelected) 74 | frame:AddChild(select) 75 | end 76 | if not selectedgroup then 77 | selectedgroup = next(configs) 78 | end 79 | select:SetGroup(selectedgroup) 80 | frame:Show() 81 | end 82 | 83 | local function RefreshOnUpdate(this) 84 | select:SetGroup(selectedgroup) 85 | this:SetScript("OnUpdate", nil) 86 | end 87 | 88 | function Ace3:ConfigTableChanged(event, appName) 89 | if selectedgroup == appName and frame then 90 | frame.frame:SetScript("OnUpdate", RefreshOnUpdate) 91 | end 92 | end 93 | 94 | reg.RegisterCallback(Ace3, "ConfigTableChange", "ConfigTableChanged") 95 | 96 | function Ace3:PrintCmd(input) 97 | input = input:trim():match("^(.-);*$") 98 | local func, err = loadstring("LibStub(\"AceConsole-3.0\"):Print(" .. input .. ")") 99 | if not func then 100 | LibStub("AceConsole-3.0"):Print("Error: " .. err) 101 | else 102 | func() 103 | end 104 | end 105 | 106 | function Ace3:OnInitialize() 107 | self:RegisterChatCommand("ace3", function() self:Open() end) 108 | self:RegisterChatCommand("rl", function() ReloadUI() end) 109 | self:RegisterChatCommand("print", "PrintCmd") 110 | end 111 | -------------------------------------------------------------------------------- /Libs/Ace3.toc: -------------------------------------------------------------------------------- 1 | ## Interface: 11503, 40400, 100207, 110000, 110002 2 | 3 | ## Title: Lib: Ace3 4 | ## Notes: AddOn development framework 5 | ## Author: Ace3 Development Team 6 | ## X-Website: http://www.wowace.com 7 | ## X-Category: Library 8 | ## X-License: Limited BSD 9 | ## Version: Release-r1349 10 | 11 | LibStub\LibStub.lua 12 | CallbackHandler-1.0\CallbackHandler-1.0.xml 13 | AceAddon-3.0\AceAddon-3.0.xml 14 | AceEvent-3.0\AceEvent-3.0.xml 15 | AceTimer-3.0\AceTimer-3.0.xml 16 | AceBucket-3.0\AceBucket-3.0.xml 17 | AceHook-3.0\AceHook-3.0.xml 18 | AceDB-3.0\AceDB-3.0.xml 19 | AceDBOptions-3.0\AceDBOptions-3.0.xml 20 | AceLocale-3.0\AceLocale-3.0.xml 21 | AceConsole-3.0\AceConsole-3.0.xml 22 | AceGUI-3.0\AceGUI-3.0.xml 23 | AceConfig-3.0\AceConfig-3.0.xml 24 | AceComm-3.0\AceComm-3.0.xml 25 | AceTab-3.0\AceTab-3.0.xml 26 | AceSerializer-3.0\AceSerializer-3.0.xml 27 | 28 | Ace3.lua 29 | -------------------------------------------------------------------------------- /Libs/AceAddon-3.0/AceAddon-3.0.xml: -------------------------------------------------------------------------------- 1 | 3 |