UnderScript

Various changes to undercards, an undertale fan-made card game.

This project is maintained by feildmaster

BootstrapDialog Events

by feildmaster (July 19, 2021)
Proposed by CMD_God

UnderScript wraps BootstrapDialog in a way that all of their dialog events call an event in the EventManager.

Events

All events have access to the dialog instance.

  1. BootstrapDialog:create: Created dialog
  2. BootstrapDialog:preshow: Before dialog.show() gets processed
    • Cancelable
  3. BootstrapDialog:show: in the process of rendering
  4. BootstrapDialog:shown: finished rendering on screen
  5. BootstrapDialog:hide: in the process of hiding
  6. BootstrapDialog:hidden: finished hiding

Examples

plugin.events().on('BootstrapDialog:create', (dialog) => {
  // Do stuff here, `dialog` was created.
});

plugin.events().on('BootstrapDialog:preshow', function (dialog) {
  // Do stuff here, `dialog` is being shown.
  this.canceled = true; // Now it wont show.
});