From 9a8dcd8fc06890ecb9b41f55ab1b4099e55ce750 Mon Sep 17 00:00:00 2001 From: Dencer Date: Thu, 5 Sep 2024 13:37:23 +0800 Subject: [PATCH] chore: update libs --- 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 | 2028 +++++++++++++++++ .../AceConfigDialog-3.0.xml | 4 + .../AceConfigRegistry-3.0.lua | 372 +++ .../AceConfigRegistry-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 | 230 ++ .../widgets/AceGUIWidget-DropDown-Items.lua | 471 ++++ .../widgets/AceGUIWidget-DropDown.lua | 732 ++++++ .../widgets/AceGUIWidget-EditBox.lua | 263 +++ .../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 | 373 +++ .../widgets/AceGUIWidget-Slider.lua | 280 +++ 32 files changed, 10388 insertions(+) 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/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 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..ab91c9e --- /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 1335 2024-05-05 19:35:16Z 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) +-- +-- - 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 @@ + + + + + +