Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Settings handling per WoW build 55000 #101

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion config.lua
Original file line number Diff line number Diff line change
@@ -148,5 +148,11 @@ frame:SetScript("OnShow", function(frame)

frame:SetScript("OnShow", nil)
end)
InterfaceOptions_AddCategory(frame)

if InterfaceOptions_AddCategory then
InterfaceOptions_AddCategory(frame)
else
local category, layout = Settings.RegisterCanvasLayoutCategory(frame, frame.name);
Settings.RegisterAddOnCategory(category);
addon.settingsCategory = category
end
8 changes: 6 additions & 2 deletions core.lua
Original file line number Diff line number Diff line change
@@ -142,8 +142,12 @@ do
if msg == "show" then
addon:OpenSack()
else
InterfaceOptionsFrame_OpenToCategory(addonName)
InterfaceOptionsFrame_OpenToCategory(addonName)
if InterfaceOptionsFrame_OpenToCategory then
InterfaceOptionsFrame_OpenToCategory(addonName)
InterfaceOptionsFrame_OpenToCategory(addonName)
else
Settings.OpenToCategory(addon.settingsCategory.ID)
end
end
end
SLASH_BugSack1 = "/bugsack"
8 changes: 6 additions & 2 deletions ldb.lua
Original file line number Diff line number Diff line change
@@ -15,8 +15,12 @@ local BugGrabber = BugGrabber

function plugin.OnClick(self, button)
if button == "RightButton" then
InterfaceOptionsFrame_OpenToCategory(addonName)
InterfaceOptionsFrame_OpenToCategory(addonName)
if InterfaceOptionsFrame_OpenToCategory then
InterfaceOptionsFrame_OpenToCategory(addonName)
InterfaceOptionsFrame_OpenToCategory(addonName)
else
Settings.OpenToCategory(addon.settingsCategory.ID)
end
else
if IsShiftKeyDown() then
ReloadUI()