Skip to content

Commit

Permalink
Add /cc profile to open profiles menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Snakybo committed Sep 21, 2020
1 parent 54a999f commit 2c95a0e
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Config/Addon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@ local module = {
}

AceConfig:RegisterOptionsTable("Clicked", config)
AceConfigDialog:AddToBlizOptions("Clicked", L["NAME"])
self.options = AceConfigDialog:AddToBlizOptions("Clicked", L["NAME"])

AceConfig:RegisterOptionsTable("Clicked/Profile", AceDBOptions:GetOptionsTable(Clicked.db))
AceConfigDialog:AddToBlizOptions("Clicked/Profile", L["OPT_PROFILES_NAME"], "Clicked")
end
self.profile = AceConfigDialog:AddToBlizOptions("Clicked/Profile", L["OPT_PROFILES_NAME"], "Clicked")
end,

["OnChatCommandReceived"] = function(self, args)
for _, arg in ipairs(args) do
if arg == "profile" then
InterfaceOptionsFrame_OpenToCategory(self.profile)
InterfaceOptionsFrame_OpenToCategory(self.profile)
break
end
end
end,
}

Clicked:RegisterModule("AddonConfig", module)

0 comments on commit 2c95a0e

Please sign in to comment.