The roll button of the character sheet (fl_stats_roll_button), behind the roll_button Lumen element: a Lumen button that shows the last roll of its stat or skill. Once pressed it tumbles through the faces of a d20 until the server has answered, then lands on the total with a flash, green for a critical success, red for a critical failure and in the accent color otherwise, and keeps the total for a few seconds before it goes back to its text. The tooltip holds the last result in words, the dice included. The element takes the props of button and roll_id, the ID of the stat or the skill whose rolls it shows, which come from Stats:get_roll. Derives from lumen_button.

Summary

Methods

Draws the icon of the button and a text next to it, centered.
Draws the button: its text, the tumbling faces of a d20 while a roll is on its way, or the total of the roll with a flash that fades into a tint of its color.
Sets the stat or the skill whose rolls the button shows.
Think()client
Puts the last result in the tooltip and plays a sound as the button lands on it, unless it landed while the sheet was closed.

Methods

PANEL:draw_roll_text(text, color, w, h)

client plugins/stats/plugin/views/cl_roll_button.lua:92

Draws the icon of the button and a text next to it, centered.

Parameters

  • text String
  • color Color
  • w Number panel width
  • h Number panel height

Draws the button: its text, the tumbling faces of a d20 while a roll is on its way, or the total of the roll with a flash that fades into a tint of its color.

Parameters

  • w Number panel width
  • h Number panel height

Sets the stat or the skill whose rolls the button shows.

Parameters

  • id String ID of the stat or the skill

Puts the last result in the tooltip and plays a sound as the button lands on it, unless it landed while the sheet was closed.

Defined in