From b6c1840de2bbd2413e6197d968c965175fcba345 Mon Sep 17 00:00:00 2001 From: Jake Wilson Date: Wed, 1 Feb 2023 15:52:24 -0700 Subject: [PATCH 1/6] Added various Ace3 support libraries --- Libs/Ace3.lua | 110 + Libs/Ace3.toc | 28 + Libs/Ace3_TBC.toc | 28 + Libs/Ace3_Vanilla.toc | 28 + Libs/Ace3_Wrath.toc | 28 + Libs/AceConfig-3.0/AceConfig-3.0.lua | 58 + Libs/AceConfig-3.0/AceConfig-3.0.xml | 8 + .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 787 +++++++ .../AceConfigCmd-3.0/AceConfigCmd-3.0.xml | 4 + .../AceConfigDialog-3.0.lua | 2019 +++++++++++++++++ .../AceConfigDialog-3.0.xml | 4 + .../AceConfigRegistry-3.0.lua | 371 +++ .../AceConfigRegistry-3.0.xml | 4 + Libs/AceDB-3.0/AceDB-3.0.lua | 740 ++++++ Libs/AceDB-3.0/AceDB-3.0.xml | 4 + Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua | 456 ++++ Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml | 4 + Libs/AceGUI-3.0/AceGUI-3.0.lua | 1020 +++++++++ Libs/AceGUI-3.0/AceGUI-3.0.xml | 28 + .../AceGUIContainer-BlizOptionsGroup.lua | 143 ++ .../widgets/AceGUIContainer-DropDownGroup.lua | 157 ++ .../widgets/AceGUIContainer-Frame.lua | 318 +++ .../widgets/AceGUIContainer-InlineGroup.lua | 103 + .../widgets/AceGUIContainer-ScrollFrame.lua | 215 ++ .../widgets/AceGUIContainer-SimpleGroup.lua | 69 + .../widgets/AceGUIContainer-TabGroup.lua | 535 +++++ .../widgets/AceGUIContainer-TreeGroup.lua | 719 ++++++ .../widgets/AceGUIContainer-Window.lua | 336 +++ .../widgets/AceGUIWidget-Button.lua | 103 + .../widgets/AceGUIWidget-CheckBox.lua | 292 +++ .../widgets/AceGUIWidget-ColorPicker.lua | 186 ++ .../widgets/AceGUIWidget-DropDown-Items.lua | 471 ++++ .../widgets/AceGUIWidget-DropDown.lua | 732 ++++++ .../widgets/AceGUIWidget-EditBox.lua | 259 +++ .../widgets/AceGUIWidget-Heading.lua | 78 + Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 140 ++ .../widgets/AceGUIWidget-InteractiveLabel.lua | 94 + .../widgets/AceGUIWidget-Keybinding.lua | 245 ++ .../AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 179 ++ .../widgets/AceGUIWidget-MultiLineEditBox.lua | 369 +++ .../widgets/AceGUIWidget-Slider.lua | 280 +++ Libs/Bindings.xml | 5 + Libs/CHANGES.txt | 135 ++ .../CallbackHandler-1.0.lua | 23 +- Libs/LICENSE.txt | 29 + Libs/LibStub/LibStub.lua | 37 +- Libs/LibStub/LibStub.toc | 9 - Libs/README.md | 26 + Libs/changelog.txt | 458 ++++ TacoTip.toc | 68 +- 50 files changed, 12458 insertions(+), 84 deletions(-) create mode 100644 Libs/Ace3.lua create mode 100644 Libs/Ace3.toc create mode 100644 Libs/Ace3_TBC.toc create mode 100644 Libs/Ace3_Vanilla.toc create mode 100644 Libs/Ace3_Wrath.toc create mode 100644 Libs/AceConfig-3.0/AceConfig-3.0.lua create mode 100644 Libs/AceConfig-3.0/AceConfig-3.0.xml create mode 100644 Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua create mode 100644 Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml create mode 100644 Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua create mode 100644 Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml create mode 100644 Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua create mode 100644 Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml create mode 100644 Libs/AceDB-3.0/AceDB-3.0.lua create mode 100644 Libs/AceDB-3.0/AceDB-3.0.xml create mode 100644 Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua create mode 100644 Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml create mode 100644 Libs/AceGUI-3.0/AceGUI-3.0.lua create mode 100644 Libs/AceGUI-3.0/AceGUI-3.0.xml create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua create mode 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua create mode 100644 Libs/Bindings.xml create mode 100644 Libs/CHANGES.txt create mode 100644 Libs/LICENSE.txt delete mode 100644 Libs/LibStub/LibStub.toc create mode 100644 Libs/README.md create mode 100644 Libs/changelog.txt diff --git a/Libs/Ace3.lua b/Libs/Ace3.lua new file mode 100644 index 0000000..3461a23 --- /dev/null +++ b/Libs/Ace3.lua @@ -0,0 +1,110 @@ + +-- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess +-- for now only /rl to reload your UI :) +-- note the complete overkill use of AceAddon and console, ain't it cool? + +-- GLOBALS: next, loadstring, ReloadUI, geterrorhandler +-- GLOBALS: BINDING_HEADER_ACE3, BINDING_NAME_RELOADUI, Ace3, LibStub + +-- BINDINGs labels +BINDING_HEADER_ACE3 = "Ace3" +BINDING_NAME_RELOADUI = "ReloadUI" +-- + +local gui = LibStub("AceGUI-3.0") +local reg = LibStub("AceConfigRegistry-3.0") +local dialog = LibStub("AceConfigDialog-3.0") + +Ace3 = LibStub("AceAddon-3.0"):NewAddon("Ace3", "AceConsole-3.0") +local Ace3 = Ace3 + +local selectedgroup +local frame +local select +local status = {} +local configs = {} + +local function frameOnClose() + gui:Release(frame) + frame = nil +end + +local function RefreshConfigs() + for name in reg:IterateOptionsTables() do + configs[name] = name + end +end + +local function ConfigSelected(widget, event, value) + selectedgroup = value + dialog:Open(value, widget) +end + +local old_CloseSpecialWindows + +-- GLOBALS: CloseSpecialWindows, next +function Ace3:Open() + if not old_CloseSpecialWindows then + old_CloseSpecialWindows = CloseSpecialWindows + CloseSpecialWindows = function() + local found = old_CloseSpecialWindows() + if frame then + frame:Hide() + return true + end + return found + end + end + RefreshConfigs() + if next(configs) == nil then + self:Print("No Configs are Registered") + return + end + + if not frame then + frame = gui:Create("Frame") + frame:ReleaseChildren() + frame:SetTitle("Ace3 Options") + frame:SetLayout("FILL") + frame:SetCallback("OnClose", frameOnClose) + + select = gui:Create("DropdownGroup") + select:SetGroupList(configs) + select:SetCallback("OnGroupSelected", ConfigSelected) + frame:AddChild(select) + end + if not selectedgroup then + selectedgroup = next(configs) + end + select:SetGroup(selectedgroup) + frame:Show() +end + +local function RefreshOnUpdate(this) + select:SetGroup(selectedgroup) + this:SetScript("OnUpdate", nil) +end + +function Ace3:ConfigTableChanged(event, appName) + if selectedgroup == appName and frame then + frame.frame:SetScript("OnUpdate", RefreshOnUpdate) + end +end + +reg.RegisterCallback(Ace3, "ConfigTableChange", "ConfigTableChanged") + +function Ace3:PrintCmd(input) + input = input:trim():match("^(.-);*$") + local func, err = loadstring("LibStub(\"AceConsole-3.0\"):Print(" .. input .. ")") + if not func then + LibStub("AceConsole-3.0"):Print("Error: " .. err) + else + func() + end +end + +function Ace3:OnInitialize() + self:RegisterChatCommand("ace3", function() self:Open() end) + self:RegisterChatCommand("rl", function() ReloadUI() end) + self:RegisterChatCommand("print", "PrintCmd") +end diff --git a/Libs/Ace3.toc b/Libs/Ace3.toc new file mode 100644 index 0000000..31668e7 --- /dev/null +++ b/Libs/Ace3.toc @@ -0,0 +1,28 @@ +## Interface: 90207 + +## Title: Lib: Ace3 +## Notes: AddOn development framework +## Author: Ace3 Development Team +## X-Website: http://www.wowace.com +## X-Category: Library +## X-License: Limited BSD +## Version: Release-r1294 + +LibStub\LibStub.lua +CallbackHandler-1.0\CallbackHandler-1.0.xml +AceAddon-3.0\AceAddon-3.0.xml +AceEvent-3.0\AceEvent-3.0.xml +AceTimer-3.0\AceTimer-3.0.xml +AceBucket-3.0\AceBucket-3.0.xml +AceHook-3.0\AceHook-3.0.xml +AceDB-3.0\AceDB-3.0.xml +AceDBOptions-3.0\AceDBOptions-3.0.xml +AceLocale-3.0\AceLocale-3.0.xml +AceConsole-3.0\AceConsole-3.0.xml +AceGUI-3.0\AceGUI-3.0.xml +AceConfig-3.0\AceConfig-3.0.xml +AceComm-3.0\AceComm-3.0.xml +AceTab-3.0\AceTab-3.0.xml +AceSerializer-3.0\AceSerializer-3.0.xml + +Ace3.lua diff --git a/Libs/Ace3_TBC.toc b/Libs/Ace3_TBC.toc new file mode 100644 index 0000000..adf8b21 --- /dev/null +++ b/Libs/Ace3_TBC.toc @@ -0,0 +1,28 @@ +## Interface: 20504 + +## Title: Lib: Ace3 +## Notes: AddOn development framework +## Author: Ace3 Development Team +## X-Website: http://www.wowace.com +## X-Category: Library +## X-License: Limited BSD +## Version: Release-r1294 + +LibStub\LibStub.lua +CallbackHandler-1.0\CallbackHandler-1.0.xml +AceAddon-3.0\AceAddon-3.0.xml +AceEvent-3.0\AceEvent-3.0.xml +AceTimer-3.0\AceTimer-3.0.xml +AceBucket-3.0\AceBucket-3.0.xml +AceHook-3.0\AceHook-3.0.xml +AceDB-3.0\AceDB-3.0.xml +AceDBOptions-3.0\AceDBOptions-3.0.xml +AceLocale-3.0\AceLocale-3.0.xml +AceConsole-3.0\AceConsole-3.0.xml +AceGUI-3.0\AceGUI-3.0.xml +AceConfig-3.0\AceConfig-3.0.xml +AceComm-3.0\AceComm-3.0.xml +AceTab-3.0\AceTab-3.0.xml +AceSerializer-3.0\AceSerializer-3.0.xml + +Ace3.lua diff --git a/Libs/Ace3_Vanilla.toc b/Libs/Ace3_Vanilla.toc new file mode 100644 index 0000000..79929b3 --- /dev/null +++ b/Libs/Ace3_Vanilla.toc @@ -0,0 +1,28 @@ +## Interface: 11403 + +## Title: Lib: Ace3 +## Notes: AddOn development framework +## Author: Ace3 Development Team +## X-Website: http://www.wowace.com +## X-Category: Library +## X-License: Limited BSD +## Version: Release-r1294 + +LibStub\LibStub.lua +CallbackHandler-1.0\CallbackHandler-1.0.xml +AceAddon-3.0\AceAddon-3.0.xml +AceEvent-3.0\AceEvent-3.0.xml +AceTimer-3.0\AceTimer-3.0.xml +AceBucket-3.0\AceBucket-3.0.xml +AceHook-3.0\AceHook-3.0.xml +AceDB-3.0\AceDB-3.0.xml +AceDBOptions-3.0\AceDBOptions-3.0.xml +AceLocale-3.0\AceLocale-3.0.xml +AceConsole-3.0\AceConsole-3.0.xml +AceGUI-3.0\AceGUI-3.0.xml +AceConfig-3.0\AceConfig-3.0.xml +AceComm-3.0\AceComm-3.0.xml +AceTab-3.0\AceTab-3.0.xml +AceSerializer-3.0\AceSerializer-3.0.xml + +Ace3.lua diff --git a/Libs/Ace3_Wrath.toc b/Libs/Ace3_Wrath.toc new file mode 100644 index 0000000..cba091d --- /dev/null +++ b/Libs/Ace3_Wrath.toc @@ -0,0 +1,28 @@ +## Interface: 30400 + +## Title: Lib: Ace3 +## Notes: AddOn development framework +## Author: Ace3 Development Team +## X-Website: http://www.wowace.com +## X-Category: Library +## X-License: Limited BSD +## Version: Release-r1294 + +LibStub\LibStub.lua +CallbackHandler-1.0\CallbackHandler-1.0.xml +AceAddon-3.0\AceAddon-3.0.xml +AceEvent-3.0\AceEvent-3.0.xml +AceTimer-3.0\AceTimer-3.0.xml +AceBucket-3.0\AceBucket-3.0.xml +AceHook-3.0\AceHook-3.0.xml +AceDB-3.0\AceDB-3.0.xml +AceDBOptions-3.0\AceDBOptions-3.0.xml +AceLocale-3.0\AceLocale-3.0.xml +AceConsole-3.0\AceConsole-3.0.xml +AceGUI-3.0\AceGUI-3.0.xml +AceConfig-3.0\AceConfig-3.0.xml +AceComm-3.0\AceComm-3.0.xml +AceTab-3.0\AceTab-3.0.xml +AceSerializer-3.0\AceSerializer-3.0.xml + +Ace3.lua diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.lua b/Libs/AceConfig-3.0/AceConfig-3.0.lua new file mode 100644 index 0000000..5071cdc --- /dev/null +++ b/Libs/AceConfig-3.0/AceConfig-3.0.lua @@ -0,0 +1,58 @@ +--- AceConfig-3.0 wrapper library. +-- Provides an API to register an options table with the config registry, +-- as well as associate it with a slash command. +-- @class file +-- @name AceConfig-3.0 +-- @release $Id: AceConfig-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $ + +--[[ +AceConfig-3.0 + +Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole. + +]] + +local cfgreg = LibStub("AceConfigRegistry-3.0") +local cfgcmd = LibStub("AceConfigCmd-3.0") + +local MAJOR, MINOR = "AceConfig-3.0", 3 +local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) + +if not AceConfig then return end + +--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true) +--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true) + +-- Lua APIs +local pcall, error, type, pairs = pcall, error, type, pairs + +-- ------------------------------------------------------------------- +-- :RegisterOptionsTable(appName, options, slashcmd, persist) +-- +-- - appName - (string) application name +-- - options - table or function ref, see AceConfigRegistry +-- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command + +--- Register a option table with the AceConfig registry. +-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly. +-- @paramsig appName, options [, slashcmd] +-- @param appName The application name for the config table. +-- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/ +-- @param slashcmd A slash command to register for the option table, or a table of slash commands. +-- @usage +-- local AceConfig = LibStub("AceConfig-3.0") +-- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"}) +function AceConfig:RegisterOptionsTable(appName, options, slashcmd) + local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options) + if not ok then error(msg, 2) end + + if slashcmd then + if type(slashcmd) == "table" then + for _,cmd in pairs(slashcmd) do + cfgcmd:CreateChatCommand(cmd, appName) + end + else + cfgcmd:CreateChatCommand(slashcmd, appName) + end + end +end diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.xml b/Libs/AceConfig-3.0/AceConfig-3.0.xml new file mode 100644 index 0000000..a3569b7 --- /dev/null +++ b/Libs/AceConfig-3.0/AceConfig-3.0.xml @@ -0,0 +1,8 @@ + + + + + +