diff --git a/.drone.status b/.drone.status index 9fd0140..afd16ef 100644 --- a/.drone.status +++ b/.drone.status @@ -1,3 +1,3 @@ - { - "url": "https://drone.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo/" - } \ No newline at end of file +{ + "url": "https://drone.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo/" +} \ No newline at end of file diff --git a/.luacheckrc b/.luacheckrc index 79cebd3..38dbd2d 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -12,12 +12,11 @@ read_globals = { "GetCVar", "GetNumAchievementCategories", "GetPreviousAchievementInLine", - "CHAT_SYSTEM", + "CHAT_SYSTEM", "EVENT_ACHIEVEMENT_UPDATED", "EVENT_ADD_ON_LOADED", - "EVENT_MANAGER", - "LibStub", - "LINK_STYLE_BRACKET", + "EVENT_MANAGER", + "LINK_STYLE_BRACKET", "zo_callLater", "ZO_SavedVars", } \ No newline at end of file diff --git a/AchievementInfo.txt b/AchievementInfo.txt index 9ffcc5d..d645eb1 100644 --- a/AchievementInfo.txt +++ b/AchievementInfo.txt @@ -8,10 +8,9 @@ ## APIVersion: 100029 ## SavedVariables: ACHIEVEMENT_INFO_DB -## OptionalDependsOn: LibAddonMenu-2.0, LibStub +## OptionalDependsOn: LibAddonMenu-2.0 ## Libraries: -Libs/LibStub/LibStub.lua Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua ## Helper: diff --git a/AchievementInfoSettings.lua b/AchievementInfoSettings.lua index 14fb0d8..ece4aaa 100644 --- a/AchievementInfoSettings.lua +++ b/AchievementInfoSettings.lua @@ -46,8 +46,6 @@ end -- Function to create the settings panel function AchievementInfo.createSettingsPanel() - local LAM = LibStub("LibAddonMenu-2.0") - local panelData = { type = "panel", name = AchievementInfo.name, @@ -151,8 +149,8 @@ function AchievementInfo.createSettingsPanel() }) -- Register - LAM:RegisterAddonPanel(AchievementInfo.name.."SettingsPanel", panelData) - LAM:RegisterOptionControls(AchievementInfo.name.."SettingsPanel", optionsTable) + LibAddonMenu2:RegisterAddonPanel(AchievementInfo.name.."SettingsPanel", panelData) + LibAddonMenu2:RegisterOptionControls(AchievementInfo.name.."SettingsPanel", optionsTable) end diff --git a/CHANGELOG.md b/CHANGELOG.md index 370196e..d6bd964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ #### Notable Changes +##### Release 2.24 +* Updated Dependencies +* Removed LibStub Usage + ##### Release 2.20 * Now all the new achievement categories are enabled by default in the settings panel diff --git a/Libs/exampleoptions.lua b/Libs/exampleoptions.lua deleted file mode 100644 index 9b4d9ea..0000000 --- a/Libs/exampleoptions.lua +++ /dev/null @@ -1,119 +0,0 @@ -local panelData = { - type = "panel", - name = "Window Title", - displayName = "Longer Window Title", - author = "Seerah", - version = "1.3", - slashCommand = "/myaddon", --(optional) will register a keybind to open to this panel - registerForRefresh = true, --boolean (optional) (will refresh all options controls when a setting is changed and when the panel is shown) - registerForDefaults = true, --boolean (optional) (will set all options controls back to default values) -} - -local optionsTable = { - [1] = { - type = "header", - name = "My Header", - width = "full", --or "half" (optional) - }, - [2] = { - type = "description", - --title = "My Title", --(optional) - title = nil, --(optional) - text = "My description text to display. blah blah blah blah blah blah blah - even more sample text!!", - width = "full", --or "half" (optional) - }, - [3] = { - type = "dropdown", - name = "My Dropdown", - tooltip = "Dropdown's tooltip text.", - choices = {"table", "of", "choices"}, - getFunc = function() return "of" end, - setFunc = function(var) print(var) end, - width = "half", --or "half" (optional) - warning = "Will need to reload the UI.", --(optional) - }, - [4] = { - type = "dropdown", - name = "My Dropdown", - tooltip = "Dropdown's tooltip text.", - choices = {"table", "of", "choices"}, - getFunc = function() return "of" end, - setFunc = function(var) print(var) end, - width = "half", --or "half" (optional) - warning = "Will need to reload the UI.", --(optional) - }, - [5] = { - type = "slider", - name = "My Slider", - tooltip = "Slider's tooltip text.", - min = 0, - max = 20, - step = 1, --(optional) - getFunc = function() return 3 end, - setFunc = function(value) d(value) end, - width = "half", --or "half" (optional) - default = 5, --(optional) - }, - [6] = { - type = "button", - name = "My Button", - tooltip = "Button's tooltip text.", - func = function() d("button pressed!") end, - width = "half", --or "half" (optional) - warning = "Will need to reload the UI.", --(optional) - }, - [7] = { - type = "submenu", - name = "Submenu Title", - tooltip = "My submenu tooltip", --(optional) - controls = { - [1] = { - type = "checkbox", - name = "My Checkbox", - tooltip = "Checkbox's tooltip text.", - getFunc = function() return true end, - setFunc = function(value) d(value) end, - width = "half", --or "half" (optional) - warning = "Will need to reload the UI.", --(optional) - }, - [2] = { - type = "colorpicker", - name = "My Color Picker", - tooltip = "Color Picker's tooltip text.", - getFunc = function() return 1, 0, 0, 1 end, --(alpha is optional) - setFunc = function(r,g,b,a) print(r, g, b, a) end, --(alpha is optional) - width = "half", --or "half" (optional) - warning = "warning text", - }, - [3] = { - type = "editbox", - name = "My Editbox", - tooltip = "Editbox's tooltip text.", - getFunc = function() return "this is some text" end, - setFunc = function(text) print(text) end, - isMultiline = false, --boolean - width = "half", --or "half" (optional) - warning = "Will need to reload the UI.", --(optional) - default = "", --(optional) - }, - }, - }, - [8] = { - type = "custom", - reference = "MyAddonCustomControl", --unique name for your control to use as reference - refreshFunc = function(customControl) end, --(optional) function to call when panel/controls refresh - width = "half", --or "half" (optional) - }, - [9] = { - type = "texture", - image = "EsoUI\\Art\\ActionBar\\abilityframe64_up.dds", - imageWidth = 64, --max of 250 for half width, 510 for full - imageHeight = 64, --max of 100 - tooltip = "Image's tooltip text.", --(optional) - width = "half", --or "half" (optional) - }, -} - -local LAM = LibStub("LibAddonMenu-2.0") -LAM:RegisterAddonPanel("MyAddon", panelData) -LAM:RegisterOptionControls("MyAddon", optionsTable)