Create highly customizable links and buttons that take any HTML attributes, have built-in key bindings support and multiple output options.
A hybrid input element similar to SugarCube's <<cycle>>
but which can be cycled in either directions by clicking, scrolling or using the arrow keys.
This macro prints the active variables (State variables and temporary, settings
and setup
) to a dialog. The new version also lets you edit their values for testing.
Disable clickable elements for a given time after click.
The drag
and drop
macros let you create and manage draggable elements in Sugarcube.
The 'drag' and 'drop' macro set
Displays a tooltip, run code and/or replace content on hover.
This macro set lets users create scalable, Sugarcube-compatible image maps.
Highly customizable input elements which can run code when a given value is entered, among other things.
The KeyControl
API lets you create and handle custom shortcuts. The API itself is format-agnostic, a set of SugarCube macros is included to interact with it.
A configurable event listener in macro form. Mainly used to run code when an input element is modified.
Lets you easily log data to the console, set up time trackers to monitor code execution and measure byte sizes.
This pair of macros make up an event-based refresh system. They are useful as a way to update displays but also for running asynchronous code.
The 'on' and 'trigger' macro set
This macro set lets you :
- create settings without JavaScript knowledge
- easily modify settings outside of the settings dialog
Create Sugarcube templates with a macro rather than in JS.
<<template 'templateName' ['alternativeName' ...]>>
...contents to display when the template is called...
<</template>>
Macro.add('template', {
tags : null,
handler() {Template.add(this.args, this.payload[0].contents)}
});
Deprecated, use <<cycle>>
+ <<listen 'click'>>
instead!