DQBsetTextStyle
SUB

Prototype

DECLARE SUB DQBsetTextStyle (BYVAL Style)

Parameters

Style - New text style

Returns

none

Description

Sets the current text style used by DQBprint. The style is indipendent from the current font; the available styles are bold, italic and underlined. To use no styles just pass the NONE constant to this function. DQBsetTextStyle allows also to set the transparent or solid text mode as well as support for color blending and textured text; by default, the transparent mode is set, but by passing the SOLID constant, next calls to DQBprint will print solid text. On the other hand, to obtain blended text, just add the BLENDED constant, while adding TEXTURED causes the current font texture to be used to print your text. You can use combinations of all the styles, by simply adding the right constants, that can be found in appendix A.

Notes:

The only styles combination that doesn't work is when you apply BOLD and TEXTURED modes together. In this case, the first one is ignored. See also DQBprint, DQBprints, DQBsetFontTexture

Example

*****************************************************************************

' All integers for speed
DEFINT A-Z

'$INCLUDE:'DIRECTQB.BI'

' Let's initialize the library with no extra layers nor sounds nor EMS
IF DQBinit(0, 0, 0) THEN DQBclose: PRINT DQBerror$: END

DQBinitVGA

' Uses normal font with DQBprint
DQBprint VIDEO, "This is a normal text", 0, 0, 31

' Let's set solid italic style...
DQBsetTextStyle SOLID + ITALIC
' ...and red background color
DQBsetTextBackCol 4

' Prints something using the new style
DQBprint VIDEO, "And this is solid italic text!", 0, 50, 31

' Waits for the user to press a key
WHILE INKEY$ = "": WEND

' Ends program
DQBclose

*****************************************************************************