PitBull Unit Frames 4.0

API / Options / LayoutEditor

Module:SetLayoutOptionsFunction(func)

Set the function to be called that will return a tuple of key-value pairs that will be merged onto the options table for the layout editor.

Parameters

func
function to call

Usage

MyModule:SetLayoutOptionsFunction(function(self)
    return 'someOption', { name = "Some option", } -- etc
end)


PitBull4.Options.GetCurrentLayout()

Return the name of the current layout.

Return value

the name of the current layout

Usage

local layout = PitBull4.Options.GetCurrentLayout()


PitBull4.Options.GetLayoutDB(module)

Return the DB dictionary for the current layout selected in the options frame.
Modules should be calling this and manipulating data within it.

Parameters

module
the module to check

Return value

the DB dictionary for the current layout

Usage

local db = PitBull.Options.GetLayoutDB(MyModule); db.some_option = "something"


PitBull4.Options.RefreshFrameLayouts()

Refresh layouts for the currently selected layout.
This should be called by modules after changing an option in the DB.

Usage

PitBull.Options.RefreshFrameLayouts()


PitBull4.Options.SetCurrentLayout(layout)

Set the current layout.

Parameters

layout
the name of the layout

Usage

PitBull4.Options.SetCurrentLayout("Normal")


PitBull4.Options.UpdateFrames()

Update frames for the currently selected layout.
This should be called by modules after changing an option in the DB.

Usage

PitBull.Options.UpdateFrames()


You must login to post a comment. Don't have an account? Register to get one!