Game Development Reference
In-Depth Information
// Draws next line beneath current one
YPos += YL;
We start by setting our font to be drawn in the top-left corner, as indicated by the
coordinates 0,0 . From there we use an if-else statement to make our currently
highlighted text stand out by coloring it red and all other text white. We also draw a
transparent gray rectangle across the entire screen.
How do we get one line to display beneath the other? Well the line YPos += YL;
represents the Y position for our text, and we set it to be its current position plus
the float YL .
We're also calling our HUD class and telling it to draw the DrawDebugText()
function, which we'll cover shortly.
7. The final thing we need to do in this class is set the default properties of
our variables:
CurrentPage=-1 // Starts us on the first page
/** Look in UDKInput.Ini to find additional debug
commands to add to this list */
Info",PageCommands[0]=(CommandName="Turn off Debug
Info",Command="showdebug none"),
PageCommands[1]=(CommandName="Toggle Camera Debug
Info",Command="showdebug camera"),
PageCommands[2]=(CommandName="Toggle Pawn Debug
Info",Command="showdebug pawn"),
PageCommands[3]=(CommandName="Toggle Pawn Weapon
Info",Command="showdebug weapon"))
(CommandName="Toggle HUD",Command="ToggleHUD"))
Search Nedrilad ::

Custom Search