Script Classes for Adventure Games/StatusLine Class
Author: Jeff Stephenson
The StatusLine Class
The StatusLine class provides a status line at the top of the screen which is programmer-definable. When enabled, it overlays the menu bar. The user may still access the menu by pressing Esc or positioning the mouse pointer in the status line end pressing the mouse button. The status line usually shows the player's score. To use a status line in a game, create an instance of class Code which has the interface described in code below and set the code property of StatusLine to it. To display the status line, execute (StatusLine enable:).
stateWhether or not the status line is being displayed. Do not manipulate this directly.
codeAn instance of Code which formats the status line. It will be called from StatusLine's doit: method with a pointer to string storage as a parameter:(code doit: @theLine)The code should format the status line into the provided string.
doit:Format the status line and display it if it has been turned on.
enable:Turns the status line on. Invokes the doit: method.
disable:Turns the status line off. Invokes the doit: method.