PitBull Unit Frames 4.0

API / ModuleHandling / IndicatorModule

IndicatorModule:ClearFrame(frame)

Clear the indicator 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)


IndicatorModule:GetFont(frame)

Return the font and size to use for the given frame.

Parameters

frame
the unit frame

Return values

  1. the font path
  2. the font size

Usage

local font, size = MyModule:GetFont(some_frame)
some_frame.MyModule:SetFont(font, size)


IndicatorModule: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


IndicatorModule:OnHide(frame)

Handle the frame being hidden

Parameters

frame
the Unit Frame hidden.

Usage

MyModule:OnHide(frame)


IndicatorModule:UpdateFrame(frame)

Update the indicator 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:UpdateFrame(frame)


call_enable_mouse_function(self, frame)

Call the :GetEnableMouse function on the indicator module regarding the given frame.

Parameters

self
frame
the frame to find out if the mouse should be enabled on

Return value

true if the mouse should be enabled for the indicator

Usage

control:EnableMouse(call_enable_mouse_function(self, frame))


call_tex_coord_function(self, frame, texture)

Call the :GetTexCoord function on the indicator module regarding the given frame.

Parameters

self
frame
the frame to get the TexCoord of
texture
the texture as returned by call_texture_function

Return values

  1. left TexCoord for left within [0, 1]
  2. right TexCoord for right within [0, 1]
  3. top TexCoord for top within [0, 1]
  4. bottom TexCoord for bottom within [0, 1]

Usage

local c1, c2, c3, c4 = call_tex_coord_function(MyModule, someFrame, "SomeTexture")


call_texture_function(self, frame)

Call the :GetTexture function on the indicator module regarding the given frame.

Parameters

self
the module
frame
the frame to get the texture of

Return value

texture the path to the texture to show

Usage

local tex, c1, c2, c3, c4 = call_texture_function(MyModule, someFrame)


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