Recent Changes - Search:

Documentation

Help

Tutorials

RoadMap

Help Docs for wiki writers:

PmWiki

edit SideBar

<Textbox>

This denote the engine should create a new Text box with the following attributes

Attributes

Required

name name of the Text box in the render list quotes are required around the name
example
name="Textbox1"

x
x location of the Text box
example
x=20

y
y location of the Text box
example
y=30

z
z location of the Text box -z is behind the viewer +z is in front of the viewer
example
z=3

Optional

renderlist
name of the renderlist to put the sprocket into. quotes are required around the name of the render list. The renderlist must exist in code first before loading of the config file. defaults to Current renderlist
example
renderlist="Default"

height
The height of the text box
Text out side this height will be clipped
For automatic sizing (text box size of text) set this to -1
defaults to -1 example
height=20

width
The width of the text box
Text out side this widthwill be clipped
For automatic sizing (text box size of text) set this to -1
defaults to -1 example
width=20

font
The True type font the text will be rendered in
This should be the file name of the True Type Font file
Currently Text boxes only support True Type Fonts
defaults to depends on the os Windows: ARIAL.TTF Mac: Chalkboard.ttf Linux: No default This is required example
font="BRITANIC.TTF"

fontpoint
The font point of true type font the text will be rendered in
defaults to 18
example
font=20

fontpath
The path to the true type font specified by the font attribute
path must in with a back slash or forward slash
defaults to depends on the OS
Windows: C:\WINDOWS\FontsMac?: /Library/Fonts/ Lunix: no default this attribute is required example
fontpath="C:\My Game\Font\"

textboxmessage
Text to display in the Text box
defaults to " "
example
textboxmessage="Hello World"

textquality
The render quality of the text to display in the Text box
Valed values 0 for FONT_QUALITY_LOW (8 bit fast for rendering but looks the ugliest) 1 for FONT_QUALITY_HIGH (best looking using Anti-aliasing around the edges of the text slowest to render in engine version .35) 2 for FONT_QUALITY_SHADED (text is render on a solid color background default background color black. Can be set by SetBackGroundColor? in code) defaults to 0
example
textquality=1

Text Color:

fontcolorred
Amount of red in the text color
Acceptable range 0-255 255 is white 0 is black defaults to 255
example
fontcolorred=240

fontcolorblue
Amount of blue in the text color
Acceptable range 0-255 255 is white 0 is black defaults to 255
example
fontcolorblue=240

fontcolorgreen
Amount of green in the text color
Acceptable range 0-255 defaults to 255
example
fontcolorgreen=240

example of Text box tag
<TextBox 
name="version" 
x=10 
y=10 
z=0 
textboxmessage="1.0.1.0" 
renderlist="Current" 
textquality=1 
width=50
height=-1  
fontpoint=14
font="CoolFont.TTF
fontpath="C:\my game\font\"
fontcolorred=255
fontcolorblue=0
fontcolorgreen=0
>
</TextBox>
Edit - History - Print - Recent Changes - Search
Page last modified on August 21, 2008, at 01:03 PM