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

Text Field User Interface Component. More...

Functions

T_void TxtfldBackSpace (T_TxtfldID TxtfldID)
 
T_void TxtfldCleanUp (T_void)
 
T_TxtfldID TxtfldCreate (T_word16 x1, T_word16 y1, T_word16 x2, T_word16 y2, T_byte8 *fontname, T_byte8 maxfieldlen, T_word16 key, E_TxtfldDataType ndatatype, T_TxtfldHandler retfunct, T_TxtfldHandler tabfunct)
 
T_void TxtfldCursLeft (T_TxtfldID TxtfldID)
 
T_void TxtfldCursRight (T_TxtfldID TxtfldID)
 
T_void TxtfldDel (T_TxtfldID TxtfldID)
 
T_void TxtfldDelete (T_TxtfldID TxtfldID)
 
T_byte8TxtfldGetData (T_TxtfldID txtfldID)
 
T_byte8TxtfldGetLine (T_TxtfldID TxtfldID)
 
T_graphicID TxtfldGetTextGraphicID (T_TxtfldID TxtfldID)
 
T_TxtfldID TxtfldIsAt (T_word16 lx, T_word16 ly)
 
T_void TxtfldKeyControl (E_keyboardEvent event, T_byte8 scankey)
 
T_void TxtfldMouseControl (E_mouseEvent event, T_word16 x, T_word16 y, E_Boolean button)
 
T_void TxtfldNextField (T_void)
 
T_void TxtfldRedraw (T_TxtfldID TxtfldID)
 
T_void TxtfldSetColor (T_TxtfldID TxtfldID, T_byte8 fc, T_byte8 bc)
 
T_void TxtfldSetData (T_TxtfldID txtfldID, T_byte8 *newdata)
 
T_void TxtfldTextDrawCallBack (T_graphicID graphicID, T_word16 index)
 
E_Boolean TxtfldUseKey (T_TxtfldID TxtfldID, T_byte8 key)
 

Detailed Description

Text Field User Interface Component.

User interface componet for handling text field components. This handles single line, read-only and modify fields, and scrollbars. And also handles colors.

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

Function Documentation

T_void TxtfldBackSpace ( T_TxtfldID  TxtfldID)

Removes a character from the data string in a text field

T_void TxtfldCleanUp ( T_void  )
T_TxtfldID TxtfldCreate ( T_word16  x1,
T_word16  y1,
T_word16  x2,
T_word16  y2,
T_byte8 fontname,
T_byte8  maxfieldlen,
T_word16  key,
E_TxtfldDataType  ndatatype,
T_TxtfldHandler  retfunct,
T_TxtfldHandler  tabfunct 
)

Adds a text form (field) to the screen.

T_void TxtfldCursLeft ( T_TxtfldID  TxtfldID)

Moves the cursor position in the Txtfld identified by TxtfldID

T_void TxtfldCursRight ( T_TxtfldID  TxtfldID)
T_void TxtfldDel ( T_TxtfldID  TxtfldID)
T_void TxtfldDelete ( T_TxtfldID  TxtfldID)

Releases memory allocated to a Txtfld Cleanup releases memory allocated to all 'Txtflds'

T_byte8* TxtfldGetData ( T_TxtfldID  txtfldID)
T_byte8* TxtfldGetLine ( T_TxtfldID  TxtfldID)
T_graphicID TxtfldGetTextGraphicID ( T_TxtfldID  TxtfldID)
T_TxtfldID TxtfldIsAt ( T_word16  lx,
T_word16  ly 
)
T_void TxtfldKeyControl ( E_keyboardEvent  event,
T_byte8  scankey 
)
T_void TxtfldMouseControl ( E_mouseEvent  event,
T_word16  x,
T_word16  y,
E_Boolean  button 
)
T_void TxtfldNextField ( T_void  )
T_void TxtfldRedraw ( T_TxtfldID  TxtfldID)
T_void TxtfldSetColor ( T_TxtfldID  TxtfldID,
T_byte8  fc,
T_byte8  bc 
)

Changes the current fore and background colors for TxtfldID

T_void TxtfldSetData ( T_TxtfldID  txtfldID,
T_byte8 newdata 
)
T_void TxtfldTextDrawCallBack ( T_graphicID  graphicID,
T_word16  index 
)

A routine that is called to draw the Txtfld (callback routine assigned to p_graphicID, called from GraphicDraw)

E_Boolean TxtfldUseKey ( T_TxtfldID  TxtfldID,
T_byte8  key 
)