Amulets & Armor
v1.02
Open Source Game
|
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) |
User Interface for Text.
DEPRECATED!
UITextAppend adds a given string to the end of the current. Any text that is past the end of the allowed range is lost.
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.
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. |
UITextDeleteAll will delete all text from the current UI Text object. It will draw the differences on the screen as well.
uiText | – Text to have all deleted from. |
UITextGotoEnd will move the display to the very end and show text as much of the text as possible.
uiText | – Text object to go to the top. |
UITextGotoTop will home the given text ui so that the top of the document is being shown.
uiText | – Text object to go to the top. |
UITextScrollDown will scroll the display down one line (if it can). It will always try to leave one line on the display.
uiText | – Text object to have scrolled. |
UITextScrollUp will scroll the display up one line (if it can).
uiText | – Text object to have scrolled. |
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.
uiText | – Text object to get tab |
tabPosition | – Tab position from left of object |