Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Make a roll button look like an Action button

1571250467
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
How do I make a roll button look like an Action button. or Make an action button do stuff like a roll button or make an action button trigger a hidden roll button?
1571253384
Andreas J.
Forum Champion
Sheet Author
Translator
You can remove the default "d20" icon from roll button, by adding the following to a sheet's CSS: button[type = roll]::before { content: '' ; } This trick can be found on the CSS Wizardy page .
1571274401
vÍnce
Pro
Sheet Author
AFAIK action buttons can only be used to trigger a sheet worker script.  Example; if the action button (name="act_do_something") is pressed on("clicked::do_something", function() {...}); do a calculation and apply the appropriate attribute values.  Only buttons (name="roll_do_something") can actually make rolls.
Pardon, what?
1571296973
vÍnce
Pro
Sheet Author
SilverRanger O. said: Pardon, what? Sorry. That does look and sound a little confusing... Action buttons and "roll" buttons are used within a character sheet's code.  Regular roll buttons are used to send output to chat like a dice roll and/or a macro.  On the other hand, action buttons do not send output to chat, they can be used to trigger sheet worker events within the sheet, like calculating attribute values.
1571313927
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I guess I need to take a harder look at my code and see what I can do to override the default and add my own styled buttons.