DrawingSurface.DrawStringWrapped(int x, int y, int width,
FontType font, Alignment,
const string text)
Draws the text onto the surface at (x,y), using the specified FONT.
width is the width of the virtual textbox enclosing the text, and is the point
that the text will wrap at. You can use the alignment parameter to determine
how the text is horizontally aligned.
The text will be printed using the current drawing colour.
Example:
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawingColor = 14;
surface.DrawStringWrapped(80, 40, 160, Game.NormalFont, eAlignCentre, "Hello, my name is Bob.");
surface.Release();
will display the text in the centre of the screen, starting from Y = 40.
Compatibility: Supported by AGS 3.0.1 and later versions.
See Also: DrawingSurface.DrawString,
DrawingSurface.DrawingColor,
DrawingSurface.DrawMessageWrapped
|