version 2/101030 by Erik Temple
Chapter: Customizing the interface to work with new functionality
We may want to add new functionality to GLAM. For example, rather than showing the name of a room when the player clicks on it, we might want to move the player to that room.
If we do this, though, we may still want to retain the ability to query the map. GLAM provides a feature to allow this. We can add a ? (query) button in the toolbar: when this button is depressed, clicking on a room in the map will display the name of the room. Release the button, and clicking on a room will (say) move the player to it. We can also show the query explanation (see above) when the query button is pressed.
To add the query button to the toolbar, just activate the "UI-query" g-element:
The display status of the UI-query is g-active.
Using the query button changes the behavior of the query explanation text (see above). When the query button is in use, the query explanation text-image will be shown every time the query button is pressed, disappearing after the player clicks on a room but reappearing when the query button is pressed again. This is intended to serve as a reminder to the player of the button's function. If we prefer to show the explanation only once, we can change the "maximum display-count" of the query explanation element:
The maximum display-count of the UI-query-explanation is 1.
The default is the special value 999, which indicates that the text will always be displayed. If we were to use 3, however, the text would disappear for good after the player has queried the map for the third time. A value of 0 means that the explanation will never appear, so to disable the explanation entirely, we can do this:
The maximum display-count of the UI-query-explanation is 0.
Note that the maximum display-count works only when the query button is in use; it will do nothing otherwise. Similarly, the "g-persistent" property used to control the UI-query-explanation in the absence of the query button has no effect when the button is active.