File Callback_plugin_Bars.lua

Functions

BarFinished (event, id, text, icon) Triggered by Bars plugin when a bar finishes
BarPause (event, id, pause) Pause a running bar
BarSetTimeLeft (event, id, timeLeft) Adjust the remaining time of a running bar.
BarStart (event, id, duration, text, icon, color, anchorID) Starts a new timer bar, if the id is the same as one allready running the running one will be replaced with this.
BarStop (event, id) Stops a running bar
BarStopAll (event) Stop all running bars


Functions

Parameters in red are optional.
BarFinished (event, id, text, icon)
Triggered by Bars plugin when a bar finishes

Parameters:

  • id (string): Identification of the bar.
  • text (string): The text originally set on the bear.
  • icon (string): The icon that was last set on the bar.
BarPause (event, id, pause)
Pause a running bar

Parameters:

  • id (string): The id of the bar that should be paused
  • pause (boolean): true means the bar should be paused, false or nil means it should resume if it was paused before.

Usage:

    RW.Callbacks:Fire("BarPause", "bar1", true)
BarSetTimeLeft (event, id, timeLeft)
Adjust the remaining time of a running bar.

Parameters:

  • id (string): The id of the bar that should be adjusted.
  • timeLeft (number): The time the bar should have left.

Usage:

    RW.Callbacks:Fire("BarSetTimeLeft", "bar1", 23)
BarStart (event, id, duration, text, icon, color, anchorID)
Starts a new timer bar, if the id is the same as one allready running the running one will be replaced with this.

Parameters:

  • id (string): Identification of the bar, used when later interacting with the bar (cancel, paus...)
  • duration (number): The duration the bar should have.
  • text (string): The text that should be displayed on the bar.
  • icon (string|number): The icon that should be displayed on the bar, if icon display is enabled.
  • color (table): The color the bar should use, if nil the color set in the options will be used. (number indexed color table).
  • anchorID (string): The ID of the anchor where the bar should pop up at first.

Usage:

    RW.Callbacks:Fire("BarStart", "bar1", 25, "This is bar 1")
BarStop (event, id)
Stops a running bar

Parameters:

  • id (string): The id of the bar that should be stopped

Usage:

    RW.Callbacks:Fire("BarStop", "bar1")
BarStopAll (event)
Stop all running bars

Parameters:

Usage:

    RW.Callbacks:Fire("BarStopAll")

Valid XHTML 1.0!