Skip to content

Commit 7fbf3cc

Browse files
committed
/upm and /profiles open the options UI in a standalone panel, allowing you to resize and move it
1 parent fdb507c commit 7fbf3cc

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

UnifiedProfileManager.lua

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,21 @@ function ns:Init()
316316
_G.SLASH_UNIFIED_PROFILE_MANAGER1 = '/upm';
317317
_G.SLASH_UNIFIED_PROFILE_MANAGER2 = '/profiles';
318318
SlashCmdList['UNIFIED_PROFILE_MANAGER'] = function()
319-
Settings.OpenToCategory(category);
319+
AceConfig:RegisterOptionsTable(name, ns:GetOptionsTable());
320+
AceConfigDialog:Open(name);
321+
local container = AceConfigDialog.OpenFrames[name];
322+
if not container or not container.frame then return; end
323+
container:SetTitle('Unified Profile Manager');
324+
local frame = container.frame;
325+
frame:SetMovable(true);
326+
frame:SetScript('OnMouseDown', function(self)
327+
self:StartMoving();
328+
end);
329+
frame:SetScript('OnMouseUp', function(self)
330+
self:StopMovingOrSizing();
331+
end);
332+
frame.ClearAllPoints = nop;
333+
frame.SetPoint = nop;
320334
end;
321335
end
322336

0 commit comments

Comments
 (0)