statusLine object | status.t[173]

Status line - this is an abstract object that controls the status line display.

We provide two main methods: showStatusHtml, which shows the status line in HTML format, and showStatusText, which shows the status line in plain text mode. To display the status line, we invoke one or the other of these methods, according to the current mode, to display the statusline. The default implementations of these methods generate the appropriate formatting codes for a statusline with a left part and a right part, calling showStatusLeft and showStatusRight, respectively, to display the text for the parts.

Games can customize the statusline at two levels. At the simpler level, a game can modify showStatusLeft and/or showStatusRight to change the text displayed on the left and/or right of the statusline. Since these two methods are used regardless of the statusline style of the underlying interpreter, games don't have to worry about the different modes when overriding these.

At the more complex level, a game can modify showStatusHtml and/or showStatusText. Modifying these routines provides complete control over the formatting of the entir status line. If a game wants to use something other than the traditional left/right display, it must modify these methods.

This object is transient, because the statusline style is a function of the interpreter we're currently running on, and thus isn't suitable for saving persistently.

`transient statusLine : object`

Superclass Tree (in declaration order)

`statusLine`
`object`

Summary of Properties

`statusDispMode`

Summary of Methods

`beginStatusLine endStatusLine getEstimatedHeightHtml initBannerWindow setColorScheme showStatusHtml showStatusLeft showStatusLine showStatusLineDaemon showStatusRight showStatusText`

Properties

`statusDispMode` | `status.t[564]`

The status mode we're using. If this is nil, it means we haven't chosen a mode yet.

Methods

`beginStatusLine ( )` | `status.t[392]`

Begin status-line mode. This sets up the output manager so that text written to the default output stream is displayed on the status line. Returns the original output stream.

`endStatusLine (oldStr)` | `status.t[470]`

end statusline display

`getEstimatedHeightHtml ( )` | `status.t[294]`

Get the estimated HTML-style banner height, in lines of text. This is used to set the status line banner size for platforms where sizing to the exact height of the rendered contents isn't supported.

If showStatusHtml() is overridden to display more or fewer lines of text than the basic implementation here, then this routine must be overridden as well to reflect the new height.

`initBannerWindow (win)` | `status.t[513]`

Initialize the banner window, given the BannerWindow object representing the status line banner API window.

`setColorScheme ( )` | `status.t[381]`

Set up the status line's color scheme. This is called each time we redraw the status line to set the background and text colors. We call the statusline banner window to do the work, since the mechanism is different between the traditional and Web UIs.

`showStatusHtml ( )` | `status.t[252]`

Show the status line in HTML format. Our default implementation shows the traditional two-part (left/right) status line, using showStatusLeft() and showStatusRight() to display the parts.

`showStatusLeft ( )` | `status.t[337]`

Show the left part of a standard left/right statusline. By default, we'll show the player character's location, by calling statusName() on the PC's immediate container.

`showStatusLine ( )` | `status.t[180]`

Show the status line, in HTML or text mode, as appropriate. By default, the library sets this up as a "prompt daemon," which means that this will be called automatically just before each command line is read.

`showStatusLineDaemon ( )` | `status.t[232]`

prompt-daemon showing the status line

`showStatusRight ( )` | `status.t[358]`

Show the right part of a standard left/right statusline. By default, we'll show the current score, a slash, and the number of turns.

`showStatusText ( )` | `status.t[317]`

Show the statusline in text mode. Our default implementation shows the traditional two-part (left/right) status line, using showStatusLeft() and showStatusRight() to display the parts.

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1