Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Save/Load game responsive footer/header in Harlowe?

Hi everyone,

I'd really like to create a header/or footer for my game in Harlowe. I want it to show the game title, save and load options, and if there is space, some of the $variables set. CRITICALLY: I want this header/or footer to be responsive

Is this possible? All the posts I've read on saving/loading games in Harlowe don't seem to address design/layout.

Comments

  • The word 'responsive' has a number of different meaning when talking about a HTML web-page/web-app, do you mean:

    a. The layout of the header/footer responds to the size of the Reader's screen, and if that screen is in portrait or landscape mode?

    b. The content of the header/footer changes dynamically as the Reader navigates from one passage to another?

    c. The Reader can interact with the header/footer?

    I am going to assume you meant B.

    Harlowe support using either a header tagged passage or a footer tagged passage to create a header or footer area that will appear for every passage.

    The contents of the header tagged passage is processed before the current passage being shown, so any variable changes in the current passage's contents will not be reflected in the header's contents. The contents of the footer tagged passage is process after the current passage being shown, so any variable changes in the current passage's contents will be reflected in the footer's contents

    eg. The following four passages demostates the above statement.

    1. startup tagged passage:
    (set: $var to 100)
    
    2. header tagged passage:
    The Header
    var: $var
    <hr>
    
    3. footer tagged passage:
    <hr>
    The footer
    var: $var
    
    4. The current passage:
    The Passage
    
    var before the change: $var
    (set: $var to 50)
    var after the change: $var
    

    There is a method you can use to cause the variable changes in the current passage to be reflected within the header tagged passage. It consists of placing a named hook within the header and using a (replace:) macro within a footer tagged passage to update that named hook.

    1. header tagged passage:
    The Header
    var: []<var|
    <hr>
    
    2. footer tagged passage:
    (replace: ?var)[$var]
    
  • This worked perfectly! Thank you so much!

Sign In or Register to comment.