PitBull Unit Frames 4.0

BarModule:ClearFrame(frame)

Clear the status bar for the current module if it exists.

Parameters

frame
the Unit Frame to clear

Return value

whether the update requires :UpdateLayout to be called

Usage

local update_layout = MyModule:ClearFrame(frame)


BarModule:GetTexture(frame)

Return the texture path to use for the given frame.

Parameters

frame
the unit frame

Return value

the texture path

Usage

local texture = MyModule:GetTexture(some_frame)
some_frame.MyModule:SetTexture(texture)


BarModule:LibSharedMedia_Registered(event, mediatype, key)

Handle a new media key being added to SharedMedia

Parameters

event
the event from LibSharedMedia
mediatype
the type of the media being added (e.g. "font", "statusbar")
key
the name of the new media


BarModule:OnHide(frame)

Handle the frame being hidden

Parameters

frame
the Unit Frame hidden.

Usage

MyModule:OnHide(frame)


BarModule:UpdateFrame(frame)

Update the status bar for the current module

Parameters

frame
the Unit Frame to update

Return value

whether the update requires :UpdateLayout to be called

Usage

local update_layout = MyModule:UpdateStatusBar(frame)


BarProviderModule:ClearFrame(frame)

Clear the status bar for the current module if it exists.

Parameters

frame
the Unit Frame to clear

Return value

whether the update requires :UpdateLayout to be called

Usage

local update_layout = MyModule:ClearFrame(frame)


BarProviderModule:OnHide(frame)

Handle the frame being hidden

Parameters

frame
the Unit Frame hidden.

Usage

MyModule:OnHide(frame)


BarProviderModule:UpdateFrame(frame)

Update the status bar for the current module

Parameters

frame
the Unit Frame to update

Return value

whether the update requires :UpdateLayout to be called

Usage

local update_layout = MyModule:UpdateStatusBar(frame)


call_background_color_function(self, frame, bar_db, value, extra, icon)

Call the :GetBackgroundColor function on the status bar module regarding the given frame.
Call the color function which the current status bar module has registered regarding the given frame.

Parameters

self
the module
frame
the frame to get the background color of
bar_db
the layout db for the specific bar (only passed for bar_provider modules)
value
the value as returned by call_value_function
extra
the extra value as returned by call_value_function
icon
the icon path as returned by call_value_function

Return values

  1. red value within [0, 1]
  2. green value within [0, 1]
  3. blue value within [0, 1]
  4. alpha value within [0, 1] or nil

Usage

local r, g, b, a = call_background_color_function(MyModule, someFrame)


call_color_function(self, frame, bar_db, value, extra, icon)

Call the :GetColor function on the status bar module regarding the given frame.
Call the color function which the current status bar module has registered regarding the given frame.

Parameters

self
the module
frame
the frame to get the color of
bar_db
the layout db for the specific bar (only passed for bar provider modules)
value
the value as returned by call_value_function
extra
the extra value as returned by call_value_function
icon
the icon path as returned by call_value_function

Return values

  1. red value within [0, 1]
  2. green value within [0, 1]
  3. blue value within [0, 1]
  4. alpha value within [0, 1]

Usage

local r, g, b, a = call_color_function(MyModule, someFrame)


call_extra_color_function(self, frame, bar_db, value, extra, icon)

Call the :GetExtraColor function on the status bar module regarding the given frame.
Call the color function which the current status bar module has registered regarding the given frame.

Parameters

self
the module
frame
the frame to get the color of
bar_db
the layout db for the specific bar (only passed for bar_provider modules)
value
the value as returned by call_value_function
extra
the extra value as returned by call_value_function
icon
the icon path as returned by call_value_function

Return values

  1. red value within [0, 1]
  2. green value within [0, 1]
  3. blue value within [0, 1]
  4. alpha value within [0, 1] or nil

Usage

local r, g, b, a = call_extra_color_function(MyModule, someFrame)


call_value_function(self, frame, bar_db)

Call the :GetValue function on the bar module regarding the given frame.

Parameters

self
the module
frame
the frame to get the value of
bar_db
the layout db for the specific bar (only passed for bar provider modules)

Return values

  1. nil or a number within [0, 1]
  2. nil or a number within (0, 1 - value]

Usage

local value, extra = call_value_function(MyModule, someFrame)


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