Add-ons / Cooldown Button

An easy to use Button with a build in Progressbar and cooldown.

Author GwenTastic
Website https://github.com/GwenTastic/Custom-Macros-for-Sugarcube/blob/master/Documentations/Cooldownbutton.md
Story format SugarCube 2
Last checked Sat Mar 14 2020
License Unlicense
Download cooldown.zip

Index

Overview

For an easy to use Button with a build in Progressbar and cooldown.

Demo File

Button Preview

Installation

To install this addon, simply copy the contents of either the Pretty or Minified CooldownButton JavaScript into your Story's JavaScript page, and the contents of the Stylesheet into your Story's Stylesheet.

Usage

<<cooldownButton "My Button">>
    /* Your Code */
<</cooldownButton>>

Macros

<<cooldownButton>>

<<cooldownButton>>

Syntax: <<cooldownButton Text [Duration] [Direction]>>

Arguments:

All of the above Properties can be a variable's name to dynamically alter any of those Properties.

Usage:

<<cooldownButton "My Button">>
    ...
<</cooldownButton>>

With variables:
<<cooldownButton "$MyVar" fill 1s>>
    ...
<</cooldownButton>>

Alternatively:
<<cooldownButton "$Name" "$Cooldown" "_Direction">>
    ...
<</cooldownButton>>

READ: Documentation

Live demo

Demo Twee code:

:: Start
<<cooldownButton "My Button">>
    /* Your Code */
<</cooldownButton>>