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

User Interface for Text. More...

Data Structures

struct  T_UITextLine
 
struct  T_UITextStruct
 

Functions

T_void UITextAppend (T_UIText uiText, T_byte8 *string)
 
T_UIText UITextCreate (T_UIGroup group, T_word16 left, T_word16 top, T_word16 right, T_word16 bottom, T_word16 maxSize, E_UITextMode textMode, T_resource font, T_screen backgroundScreen, T_color textColor, T_color backgroundColor, T_color selectedTextColor, T_color selectedTextBackgroundColor)
 
T_void UITextDeleteAll (T_UIText uiText)
 
T_void UITextGotoEnd (T_UIText uiText)
 
T_void UITextGotoTop (T_UIText uiText)
 
T_void UITextScrollDown (T_UIText uiText)
 
T_void UITextScrollUp (T_UIText uiText)
 
T_void UITextSetTab (T_UIText uiText, T_word16 tabPosition)
 

Detailed Description

User Interface for Text.

DEPRECATED!

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

Function Documentation

T_void UITextAppend ( T_UIText  uiText,
T_byte8 string 
)

UITextAppend adds a given string to the end of the current. Any text that is past the end of the allowed range is lost.

Parameters
uiText– UI Text object to append text onto.
string– String of characters to append
T_UIText UITextCreate ( T_UIGroup  group,
T_word16  left,
T_word16  top,
T_word16  right,
T_word16  bottom,
T_word16  maxSize,
E_UITextMode  textMode,
T_resource  font,
T_screen  backgroundScreen,
T_color  textColor,
T_color  backgroundColor,
T_color  selectedTextColor,
T_color  selectedTextBackgroundColor 
)

UITextCreate will do everything that needs to be done to create and set up a ui text object that will be used in a UI Group. Just pass it a long list of parameters that declare what type of text object you want. From this point on, all the options will be in full force.

Parameters
group– UI Group to add ui text to.
left– Left border of text.
top– Top border of text.
right– Right border of text.
bottom– Bottom border of text.
maxSize– Tells what is the maximum number of characters allowed in the text region.
textMode– Choose between text you can edit, text to view, or text where each line is selectable.
font– Font text will be in.
backgroundScreen– Background picture to use when characters are erased. If you specify NULL, no background will be used.
textColor– Color of the text.
backgroundColor– Color of the background. Use COLOR_CLEAR if you are using a background screen.
selectedTextColor– Color of text that is selected. T_color selectedTextBackgroundColor
selectedTextBackgroundColor– Color of background when text is selected. Pass COLOR_CLEAR if you do not want a background selected color.
Returns
Create ui text object is returned.
T_void UITextDeleteAll ( T_UIText  uiText)

UITextDeleteAll will delete all text from the current UI Text object. It will draw the differences on the screen as well.

Parameters
uiText– Text to have all deleted from.
T_void UITextGotoEnd ( T_UIText  uiText)

UITextGotoEnd will move the display to the very end and show text as much of the text as possible.

Parameters
uiText– Text object to go to the top.
T_void UITextGotoTop ( T_UIText  uiText)

UITextGotoTop will home the given text ui so that the top of the document is being shown.

Parameters
uiText– Text object to go to the top.
T_void UITextScrollDown ( T_UIText  uiText)

UITextScrollDown will scroll the display down one line (if it can). It will always try to leave one line on the display.

Parameters
uiText– Text object to have scrolled.
T_void UITextScrollUp ( T_UIText  uiText)

UITextScrollUp will scroll the display up one line (if it can).

Parameters
uiText– Text object to have scrolled.
T_void UITextSetTab ( T_UIText  uiText,
T_word16  tabPosition 
)

UITextSetTab is used to declare the position of tabs within a text line (actually, all text lines in a ui text), so that when a tab character (0x9) is found, the characters move to tab location.

NOTE: In the debuging version, trying to create more than 8 tabs will bomb. Also, all tabs should be defined before adding text or being drawn. If you don't, unpredictable results may occur.

Parameters
uiText– Text object to get tab
tabPosition– Tab position from left of object