User Tools

Site Tools


harlowe:alert

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:alert [2017/10/09 20:39] (current)
Line 1: Line 1:
 +**(alert: // [[harlowe:​String|String]]//​) -> //​[[harlowe:​Command|Command]]//​**
 +
 +This macro produces a [[harlowe:​Command|Command]] that, when evaluated, shows a browser pop-up dialog box with the given
 +[[harlowe:​string|string]] displayed, and an "​OK"​ button to dismiss it.
 +
 +=== Example usage: ===
 +
 +''​%%(alert:"​Beyond this point, things get serious. Grab a snack and buckle up."​)%%''​
 +
 +=== Details: ===
 +
 +This is essentially identical to the Javascript ''​%%alert()%%''​ function in purpose and ability. You
 +can use it to display a special message above the game itself. But, be aware that as the box uses
 +the player'​s operating system and browser'​s styling, it may clash visually with the design
 +of your story.
 +
 +When the dialog is on-screen, the entire game is essentially "​paused"​ - no further computations are
 +performed until it is dismissed.
 +
 +=== See also: ===
 +
 +[[harlowe:​prompt|(prompt:​)]],​ [[harlowe:​confirm|(confirm:​)]]
  
harlowe/alert.txt ยท Last modified: 2017/10/09 20:39 (external edit)