Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - UI logic

    [The UI logic rules are used to decide which state should be shown for each button, and whether it should be clickable.]

    The UI logic rules are an object-based rulebook.

    UI logic rule for UI-zoom-in:
        if current zoom level of the map-renderer < the number of entries of the zoom-level set of the associated tileset of the map-renderer:
            activate graphlink for UI-zoom-in;
            now the image-ID of UI-zoom-in is the resting state of UI-zoom-in;
        otherwise:
            deactivate graphlink for UI-zoom-in;
            now the image-ID of UI-zoom-in is the inactive state of UI-zoom-in.
        
    UI logic rule for UI-zoom-out:
        if current zoom level of the map-renderer > 1:
            activate graphlink for UI-zoom-out;
            now the image-ID of UI-zoom-out is the resting state of UI-zoom-out;
        otherwise:
            deactivate graphlink for UI-zoom-out;
            now the image-ID of UI-zoom-out is the inactive state of UI-zoom-out.

    [UI logic rule for UI-query:
        if the current map label is display-active:
            now the image-ID of UI-query is the depressed state of UI-query;
        otherwise:
            change the image-ID of UI-query to the resting state of UI-query.]