Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Next »

beforeLoad() is a special function that allows you to run JavaScript code before a Genie screen is rendered. This is useful, for example, to adjust the X/Y multipliers based on the display size. If defined, it will be called before every Genie screen is rendered.

Example:

function beforeLoad() {

  if (pui.genie.displaySize == 132) {

    pui.multX = 6;
    pui.multY = 20;

  }
  else {

    pui.multX = 8;
    pui.multY = 23;

  }

}


  • No labels