Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
SCRFORM

Script-based Forms. More...

Functions

T_void ScriptFormCallback (E_formObjectType objtype, T_word16 objstatus, T_word32 objID)
 
T_void ScriptFormEnd (T_void)
 
T_void ScriptFormStart (T_word32 uiFormNumber)
 
T_void ScriptFormTextBoxSetSelection (T_word16 id, T_word16 selection)
 
T_void ScriptFormUpdate (T_void)
 

Detailed Description

Script-based Forms.

Script based forms. DEPRECATED? I don't think we are really using this any more. But the idea was that a level could have a form that pops up to provide an option.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Function Documentation

T_void ScriptFormCallback ( E_formObjectType  objtype,
T_word16  objstatus,
T_word32  objID 
)

ScriptFormCallback is called each time an action occurs with the current form. This routine filters the data and passes it on up to the the server for evaluation.

NOTE: Not all ui messages are sent to the server.

Parameters
objtype– Type of object causing event
objstatus– State of the object (state depends on objtype).
objID– ID of particular object
T_void ScriptFormEnd ( T_void  )

ScriptFormEnd ends a session between UI and comm and closes out the form and all related functionality.

T_void ScriptFormStart ( T_word32  uiFormNumber)

ScriptForm is called to present a form to the player and allow choices to be made and sent to the server. The server can then make decisions and send them to this form.

NOTE: This routine is not be recursive, so any call to this routine while it already being executed will cause an error.

Parameters
uiFormNumber– Number of form to load
T_void ScriptFormTextBoxSetSelection ( T_word16  id,
T_word16  selection 
)

ScriptFormTextBoxSetSelection moves the cursor on a ui text box to the given row – for selection boxes, this causes the nth item to be selected.

Parameters
id– text box id number
selection– Selection number/row
T_void ScriptFormUpdate ( T_void  )

ScriptFormUpdate is called as much as possible to update all the events necessary for doing UI via the comm port.