Skip to content
Merged
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions Core/MultiBot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,44 @@ function MultiBot.SetQuickFramePosition(frameKey, point, relPoint, x, y)
return position
end

function MultiBot.GetQuickFrameVisibleConfig(frameKey)
if type(frameKey) ~= "string" or frameKey == "" then
return true
end

local profile = MultiBot.db and MultiBot.db.profile
if not profile then
return true
end

profile.ui = profile.ui or {}
profile.ui.quickFrameVisibility = profile.ui.quickFrameVisibility or {}

local value = profile.ui.quickFrameVisibility[frameKey]
if type(value) ~= "boolean" then
profile.ui.quickFrameVisibility[frameKey] = true
return true
end

return value
end

function MultiBot.SetQuickFrameVisibleConfig(frameKey, visible)
if type(frameKey) ~= "string" or frameKey == "" then
return true
end

local value = not not visible
local profile = MultiBot.db and MultiBot.db.profile
if profile then
profile.ui = profile.ui or {}
profile.ui.quickFrameVisibility = profile.ui.quickFrameVisibility or {}
profile.ui.quickFrameVisibility[frameKey] = value
end

return value
end

local function getLegacyHunterPetStanceStore(createIfMissing)
local saved = getLegacyCharacterStateRoot(createIfMissing)
local store = saved and saved.hunterPetStance
Expand Down
Loading
Loading