- Insert a new line - Change Font and Size - Create an Anchor point - Change font Color and Optio"> GuiMLTextCtrl / GuiMLTextEditCtrl Tags and Profile Properties | Torque Game Builder | Forums | Community | GarageGames.com

Game Development Community

GuiMLTextCtrl / GuiMLTextEditCtrl Tags and Profile Properties

by Matthew Langley · in Torque Game Builder · 08/31/2006 (1:11 pm) · 6 replies

Posted by Harold "LabRat" Brown

GuiMLTextCtrl / GuiMLTextEditCtrl Tags:
==============

- Insert a new line
- Change Font and Size
- Create an Anchor point
- Change font Color and Optionally Alpha
- Change Shadow Color and Optionally Alpha
- Change Link Color and Optionally Alpha
- Change Link Highlighted Color and Optionally Alpha
- Shadow Offest
- Inline Bitmap
- Save Formatting information
- Restore Saved Formatting information
- Justify Left
- Justify Right
- Justify Center
- URL to a website
- Set Left Margin as a Percentage of width
- Set Left Margin
- Set Right Margin as a Percentage of width
- Set Right Margin
- creats a divider
- Set tab stops

- Unknown
- Unknown

-----------------------------------------------------------------------------------------
Profile Properties
============
tab - True if this object is accessable from using the tab key
canKeyFocus - True if the object can be given keyboard focus (in other words, made a first responder
mouseOverSelected - True if this object should be "selected" while the mouse is over it

modal - True if this is a Modeless dialog meaning it will pass input through instead of taking it all
opaque - True if this object is not translucent
fillColor - Fill color, this is used to fill the bounds of the control if it is opaque
fillColorHL - This is used insetead of fillColor if the object is highlited
fillColorNA - This is used to instead of fillColor if the object is not active or disabled
border - For most controls, if mBorder is > 0 a border will be drawn, some controls use this to draw different types of borders however
borderThickness - Border thickness
borderColor - Border color, used to draw a border around the bounds if border is enabled
borderColorHL - Used instead of borderColorwhen the object is highlited
borderColorNA - Used instead of mBorderColor when the object is not active or disabled

bevelColorHL - Used for the high-light part of the bevel
bevelColorLL - Used for the low-light part of the bevel

fontType - Font face name for the control
fontSize - Font size for the control
fontCharset - Font character set
fontColors - Array of font colors used with escape characters for changing color mid-string
fontColor - Main font color
fontColorHL - Highlited font color
fontColorNA - Font color when object is not active/disabled
fontColorSEL - Font color when object/text is selected
fontColorLink - Font color for hyperlinks
fontColorLinkHL - Font color when a hyperlink is highlited
justify - Alignment of text in a text control
textOffset - Offset of text in a text control
autoSizeWidth - Auto-size the width-bounds of the control to fit it's contents
autoSizeHeight - Auto-size the height-bounds of the control to fit it's contents
returnTab - Used in GuiTextEditCtrl to specify if a tab-event should be simulated when return is pressed.
numbersOnly - For text controls, true if this should only accept numerical data
cursorColor - Color for the blinking cursor in text fields (for example)

bitmap - Bitmap file name for the bitmap of the control

soundButtonDown - Sound played when the object is "down" ie a button is pushed
soundButtonOver - Sound played when the mouse is over the object

-------------------------------------

Can you create a new profile? Yes you can, but you must load the TorqueScript file containing it before you load the GUI file that makes reference to it.

About the author

Was a GG Associate and then joined GG in 2005. Lead tool dev for T2D and T3D. In 2011 joined mobile company ngmoco/DeNA and spent about 4 years working game and server tech. 2014 joined startup Merigo Games developing server technology.


#1
09/04/2006 (6:57 am)
@LabRat/Matthew, thanks for the info -- perhaps the Wiki for TorqueML needs some updating, looks like LabRat had some extra definitions that were left blank on the wiki ...
#2
07/09/2008 (2:20 am)
Matt,

Is there any tags to make certain text underlined or displayed in italics?

If I want that certain word on the displayed text are clickable, what tags do I need to use?

many thanks,
#3
08/10/2008 (10:14 pm)
Assuming you have the source, it seems like it would be easy to modify this resource to at least underline.

To make text clickable, you use the "a:" tag. In general, I've found this TDN page to be most useful.
#4
08/11/2008 (12:41 am)
William,
if I use GuiMLTextProfile for my GuiMLTextCtrl, an "a:" tag will automatically set the word clickable AND underlined at the same time.

Using another profile however (or defining a custom profile with different font) might not yield the same result..;-)
#5
09/20/2010 (10:17 am)
Hi All,

I am tring to open URL page inside t2dSceneWindow. How to do this? Anybody has an idea. For example.. If I click on link to open garagegames.com, so it shouldnot open a new window with garagegames.com..instead it should open url page inside t2dSceneWindow created under Gui.

Please help me. Thanks.
#6
09/21/2010 (2:18 am)
This will require source code modifications. The current versionof Torque2D does not handle this. You might try starting with this, but I think there will be a lot of work involved:

www.torquepowered.com/community/blogs/view/13710

Also, you shouldn't make multiple posts with the same question. The forums can already get clogged up with questions, and with the better searching now, you should only need to put this one place.