GUI/Help Files
From TDN
|
|
[edit] IntroductionHelp files are basic text based files that can be linked into your GUI or game in which you can provide the player with large amounts of information. The SDK currently uses these to provide the editors with a mini-manual on how to use the tools provided. To find example help files please go to Torque\SDK\example\common\help. These files use Torque's Markup Language - TorqueML [edit] OverviewHelp files are text files that should be saved as .HFL files. To do this use Notepad, do 'save as', select 'Save file type' and select 'All Files', naming your help file MyExampleHelpFile.hfl. Currently, Help files are linked to the GUI via the help.cs file found in Torque\SDK\example\common\client. This file add rows of helpfiles for each one, dynamically updating the content of the help GUI. This is why you see files named with 1.1 or 0. as the files are added in numerical preference. [edit] TextAny text can be put into a help file, and will be directly parsed as text without any formating or style. [edit] FontsFonts will call up fonts that are available in your system's fonts directory. The opening font tag dictates the preceding content, until 'closed' by a new font tag setting the rest of the text. The syntax goes as follows: <font:FONTNAME STYLE:SIZE>Content<font:FONTNAME:SIZE> An example of this would be; <font: Arial Bold:20>Torque Game Engine Licenses<font: Arial:16> . In this example, the title will be in bold, but the text following the title will be in normal Arial 16. [edit] MarginsMargins are defined by left and right, and provided in percentages defined by integers. You call these at the very first line of the help file. <lmargin%:INTERGER><rmargin%:INTERGER> An example of this would be; <lmargin%:5><rmargin%:95>. [edit] LinksLinks are coded with the following syntax: <a:LINK URL>LINK TITLE</a> An example link is the following; <a:www.garagegames.com/pg/product/view.php?id=1>Torque Game Engine - Indie License</a>. [edit] BitmapsYou can add images to your helpfile, typically, these remain .png files as to allow the help file's background to be changed without affected the image (the file extension is left off, as done with all GUI related images, the GUI will search for both .jpg and .png). To call up an image use the following syntax: <bitmap:IMAGEPATH> An exmaple of this goes as such; <bitmap:demo/client/ui/seperator>. [edit] Example help fileHere's a little help file exmaple from Torque\SDK\example\starter.fps\client\ui\1.credits.hfl, which contains most of these features: <just:center><lmargin%:5><rmargin%:95><font:Arial Bold:20>Torque Game Engine Credits... <bitmap:demo/client/ui/seperator> <font:Arial Bold:20>GarageGames.com Staff<font:Arial:16> <a:www.garagegames.com/my/home/view.profile.php?qid=3>Jeff "MotoMan" Tunnell</a> <a:www.garagegames.com/my/home/view.profile.php?qid=1>Tim "Slacker" Gift</a> <a:www.garagegames.com/my/home/view.profile.php?qid=2>Rick "Entropy" Overman</a> <a:www.garagegames.com/my/home/view.profile.php?qid=55>Mark "Got Milk?" Frohnmayer</a> <a:www.garagegames.com/my/home/view.profile.php?qid=5030>Brian "Twitch" Ramage</a> <a:www.garagegames.com/my/home/view.profile.php?qid=5263>Alex Swanson</a> <a:www.garagegames.com/my/home/view.profile.php?qid=10185>Jay Moore</a> <bitmap:demo/client/ui/seperator> <font:Arial Bold:20>Torque Engine Programmers<font:Arial:16> <a:www.garagegames.com/my/home/view.profile.php?qid=438>Dave "Symlink" Moore</a> <a:www.garagegames.com/my/home/view.profile.php?qid=572>John "Uberbob" Folliard</a> <a:www.garagegames.com/my/home/view.profile.php?qid=4872>Greg "Jett" Lancaster</a> <a:www.garagegames.com/my/home/view.profile.php?qid=6019>Tim "Kidney Thief" Anderson</a> John "Sne/\ker" Alden Lincoln "Missing" Hutton Brad "BigDevDawg" Heinz Clark Fagot Shawn Eastley |
Categories: TGE | TGB | GUI



