Code Monkey home page Code Monkey logo

mali-s-macros's Introduction

Macros

The 'a' macro

Create highly customizable links and buttons that take any HTML attributes, have built-in key bindings support and multiple output options.

The 'a' macro


The 'arrowbox' macro

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.

The 'arrowbox' macro


The 'checkvars' macro

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.

The 'checkvars' macro


The 'drag' and 'drop' macro set

The drag and drop macros let you create and manage draggable elements in Sugarcube.

The 'drag' and 'drop' macro set


The 'hover' macro

Displays a tooltip, run code and/or replace content on hover.

The 'hover' macro


The 'input' macro set

Highly customizable input elements which can run code when a given value is entered, among other things.

The 'input' macro set


The 'KeyControl' API and macro set

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.

KeyControl API and macro set


The 'listen' macro

A configurable event listener in macro form. Mainly used to run code when an input element is modified.

The 'listen' macro


The 'log' macro

Lets you easily log data to the console, set up time trackers to monitor code execution and measure byte sizes.

'Log' macro


The 'on' and 'trigger' macros

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


JS-free settings API

Lets you use the built-in Settings API without JavaScript knowledge.

The settings macro


Template macro

Create Sugarcube templates with a macro rather than in JS.

Syntax

<<template 'templateName' ['alternativeName' ...]>>
   ...contents to display when the template is called...
<</template>>

Code

Macro.add('template', {
   tags : null,
   handler() {Template.add(this.args, this.payload[0].contents)}
});

The 'toggle' macro

Deprecated, use <<cycle>> + <<listen 'click'>> instead!


The 'vanish' macros

Creates custom containers that can be made to vanish/appear based on a timed delay or triggered events.

The 'vanish' macro set


mali-s-macros's People

Contributors

malifaciousgames avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hituro

mali-s-macros's Issues

Listen macro not working as I assumed

<<listen>>
    <h1>Passgae header</h1>
    <p>Press [Space] to play.</p>
    <div id="spacebar">
    </div>
    
    <style>
        #spacebar {
            ...
        }
    </style>
    
    <<when 'keypress'>>

    <<if _event.code === 'Space'>>
        <<goto "anotherPassage">>
    <</if>>

<</listen>>

I would assume that this would work, but instead of the <<goto "anotherPassage">> we tried anything from <<run>> to <<script>>. Please tell me if it is something silly I missed. ๐Ÿ’›

CheckVars 2.0 is not working

I've been using the first check vars, and decided to download the new one. But when I try the new one, the 2.0. The usual <> macro, it doesn't do anything. So, I went back to the old one. But yeah, not sure what happen. Did you change how it works?

Tooltip on hover-macro is overflowing

Basically, when I hovered over, if the element is near the edge of the viewport, it will overflow and cut parts of the tooltip. I modify some of the css to make it works, like setting the width: maxcontent to something else. But atm, it's not the ideal solution. Is there a better solution to this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.