Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous

  • Section - Animations for button response

    A glulx timed activity rule (this is the redraw button from timer rule):
        stop the timer;
        follow the window-drawing rules for the assigned window of the current graphlink.
    To revert the/-- button/-- after (T - a real number) second/seconds:
        (- glk_request_timer_events({T}/10); -)
    To stop the/-- timer:
        (- glk_request_timer_events(0); -)

    [Section - Optional undo control (for use with Undo Output Control by Erik Temple)

    [This section can be uncommented should you wish to add buttons to your game that actually cause a turn to pass--none of the buttons as defined by default result in that.]

    [The timer introduces a certain wild-card element. The upshot is that, when we undo, the events that happen after the timer fires are not "remembered"--so, the state of the button will still be active after we undo, and the timer event will not fire. The after undoing an action rule here requests the timer event immediately after undoing, so that the button will return to its initial state as needed. This has the added benefit of indicating to the player exactly what is being reconstructed after UNDO, the pressing of the button. This is rather primitive, in that the timer event is requested no matter the situation (i.e, regardless of whether the last turn involved a button press; however, things are structured so that this is harmless.]

    After undoing an action:
        revert the button after 0.1500 seconds;]

    Glimmr Automap ends here.