Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Modal Restrictions

    To decide whether we are in a strictly modal situation:
        if identity reassignment mode is true, decide yes;
        if center-overlay mode is true, decide yes;
        if alignment mode is true, decide yes;
        [if drawing mode is true, decide yes;]
        decide no;
        
    After reading a command when we are in a strictly modal situation:
        unless the player's command matches "page [nudge-direction]":
        [allows the player to page the library in a modal situation, but any other action that generates a command will cancel the mode.]
            cancel the current strict mode[, verbosely];
                            
    A clicking graphlink rule when we are in a strictly modal situation and the current graphlink window is the working window (this is the strict modal mouse input rule):
        let the selected-element be entry 1 of the element-selection set;
        if center-overlay mode is true and the click hit a hot link:
            center the selected-element on the current graphlink;
            now glulx replacement command is "";
            now center-overlay mode is false;
            rule succeeds;
        if alignment mode is true and the click hit a hot link:
            let border-indicator be the border-name understood;
            align the selected-element to the current graphlink according to the border-name understood;
            now alignment mode is false;
            now glulx replacement command is "";
            rule succeeds;
        cancel the current strict mode;
        now glulx replacement command is "";
        rule fails;
                
    A clicking graphlink rule when we are in a strictly modal situation and the current graphlink window is the library-window (this is the strict modal library input rule):
        if identity reassignment mode is true and the click hit a hot link:
            now glulx replacement command is "";
            let the selected-element be entry 1 of the element-selection set;
            change the image-ID of the selected-element to the image-ID of the current graphlink;
            follow the window-drawing rules for the working window;
            now identity reassignment mode is false;
            rule succeeds;
        cancel the current strict mode;
        now glulx replacement command is "";
        rule fails;
        
    The strict modal library input rule is listed before the clicking in library rule in the clicking graphlink rules. The strict modal mouse input rule is listed before the strict modal library input rule in the clicking graphlink rules.
                
    To cancel the current strict mode, verbosely:
        if identity reassignment mode is true:
            if verbosely, say "[bracket]Reassignment canceled.[close bracket]";
        if center-overlay mode is true:
            if verbosely, say "[bracket]Centering canceled.[close bracket]";
        if alignment mode is true:
            if verbosely, say "[bracket]Alignment canceled.[close bracket]";
        now center-overlay mode is false;
        now identity reassignment mode is false;
        now alignment mode is false;