hgeFont::GetStringWidth

Returns the on-screen string width.

float GetStringWidth(
  const char *string,
  bool bMultiline = true
);

Parameters

string
Pointer to a string which width is to be calculated.
bMultiline
If the specified string contains line breaks and this parameter is true, the width of the longest line is returned. If false the width of the first line is returned.

Return value

Returns actual on-screen width of the specified string in pixels.

Requirements

Header: hgefont.h
Import library: hgehelp.lib