-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
189 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ | |
[submodule "Libs/LibShowUIPanel-1.0"] | ||
path = Libs/LibShowUIPanel-1.0 | ||
url = https://github.com/DengSir/LibShowUIPanel-1.0.git | ||
[submodule "Libs/tdOptions"] | ||
path = Libs/tdOptions | ||
url = [email protected]:DengSir/tdOptions.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-- Option.lua | ||
-- @Author : Dencer ([email protected]) | ||
-- @Link : https://dengsir.github.io | ||
-- @Date : 9/5/2024, 1:39:10 PM | ||
-- | ||
---@type ns | ||
local ns = select(2, ...) | ||
|
||
local L = ns.L | ||
local tdOptions = LibStub('tdOptions') | ||
|
||
---@class Addon | ||
local Addon = ns.Addon | ||
|
||
function Addon:SetupOptionFrame() | ||
local order = 0 | ||
local function orderGen() | ||
order = order + 1 | ||
return order | ||
end | ||
|
||
local function fullToggle(name) | ||
return {type = 'toggle', name = name, width = 'full', order = orderGen()} | ||
end | ||
|
||
local options = { | ||
type = 'group', | ||
name = format('tdInspect - |cff00ff00%s|r', C_AddOns.GetAddOnMetadata('tdInspect', 'Version')), | ||
get = function(item) | ||
return self.db.profile[item[#item]] | ||
end, | ||
set = function(item, value) | ||
local key = item[#item] | ||
self.db.profile[key] = value | ||
self:SendMessage('TDINSPECT_OPTION_CHANGED', key, value) | ||
end, | ||
args = { | ||
characterGear = fullToggle(L['Show character gear list']), | ||
inspectGear = fullToggle(L['Show inspect gear list']), | ||
inspectCompare = fullToggle(L['Show inspect compare']), | ||
showTalentBackground = fullToggle(L['Show talent background']), | ||
}, | ||
} | ||
|
||
tdOptions:Register('tdInspect', options) | ||
end | ||
|
||
function Addon:OpenOptionFrame() | ||
tdOptions:Open('tdInspect') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters