DX9 Overlay API (en)
Functions
overlay.h File Reference

Go to the source code of this file.

Functions

int TextCreate (const char *Font, int FontSize, bool bBold, bool bItalic, int x, int y, unsigned int color, const char *text, bool bShadow, bool bShow)
 
int TextDestroy (int ID)
 
int TextSetShadow (int id, bool b)
 
int TextSetShown (int id, bool b)
 
int TextSetColor (int id, unsigned int color)
 
int TextSetPos (int id, int x, int y)
 
int TextSetString (int id, const char *str)
 
int TextUpdate (int id, const char *Font, int FontSize, bool bBold, bool bItalic)
 
int BoxCreate (int x, int y, int w, int h, unsigned int dwColor, bool bShow)
 
int BoxDestroy (int id)
 
int BoxSetShown (int id, bool bShown)
 
int BoxSetBorder (int id, int height, bool bShown)
 
int BoxSetBorderColor (int id, unsigned int dwColor)
 
int BoxSetColor (int id, unsigned int dwColor)
 
int BoxSetHeight (int id, int height)
 
int BoxSetPos (int id, int x, int y)
 
int BoxSetWidth (int id, int width)
 
int LineCreate (int x1, int y1, int x2, int y2, int width, unsigned int color, bool bShow)
 
int LineDestroy (int id)
 
int LineSetShown (int id, bool bShown)
 
int LineSetColor (int id, unsigned int color)
 
int LineSetWidth (int id, int width)
 
int LineSetPos (int id, int x1, int y1, int x2, int y2)
 
int ImageCreate (const char *path, int x, int y, int rotation, int align, bool bShow)
 
int ImageDestroy (int id)
 
int ImageSetShown (int id, bool bShown)
 
int ImageSetAlign (int id, int align)
 
int ImageSetPos (int id, int x, int y)
 
int ImageSetRotation (int id, int rotation)
 
int DestroyAllVisual ()
 
int ShowAllVisual ()
 
int HideAllVisual ()
 
int GetFrameRate ()
 
int GetScreenSpecs (int &width, int &height)
 
int Init ()
 
void SetParam (const char *_szParamName, const char *_szParamValue)
 

Function Documentation

int BoxCreate ( int  x,
int  y,
int  w,
int  h,
unsigned int  dwColor,
bool  bShow 
)

Creates a box.

Parameters
[in]xPosition X scaled on a resolution of 800 x 600.
[in]yPosition Y scaled on a resolution of 800 x 600.
[in]wBox's width scaled on a resolution of 800 x 600.
[in]hBox's height scaled on a resolution of 800 x 600.
[in]dwColorColor of the box (ARGB).
[in]bShowShould the box be drawed after the initialization?
Returns
Returns the box's id, return -1, if an error occured.
int BoxDestroy ( int  id)

Destroys a box.

Parameters
[in]idBox's id.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetBorder ( int  id,
int  height,
bool  bShown 
)

Enables a border for the box or disables it.

Parameters
[in]idBox's id.
[in]heightBorder's height.
[in]bShowntrue, if the border should be displayed, otherwise false.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetBorderColor ( int  id,
unsigned int  dwColor 
)

Set die border's color.

Parameters
[in]idBox's id.
[in]dwColorBorder's color (ARGB).
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetColor ( int  id,
unsigned int  dwColor 
)

Set the box's color.

Parameters
[in]idBox's id.
[in]dwColorBox'x color (ARGB).
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetHeight ( int  id,
int  height 
)

Set the box's height.

Parameters
[in]idBox's id.
[in]heightBox's height, scaled on a resolution of 800 x 600.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetPos ( int  id,
int  x,
int  y 
)

Sets the position of the box.

Parameters
[in]idBox's id.
[in]xPosition-X, scaled on a resolution of 800 x 600.
[in]yPosition-Y, scaled on a resolution of 800 x 600.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetShown ( int  id,
bool  bShown 
)

Hides or shows a box.

Parameters
[in]idID of the box.
[in]bShowntrue, if the box should be displayed, otherwise false.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int BoxSetWidth ( int  id,
int  width 
)

Sets the box's width.

Parameters
[in]idBox's id.
[in]widthBox's width.
Returns
1 if successfull, 0 if not.
See also
BoxCreate()
int DestroyAllVisual ( )

Destroys all overlays.

Returns
1 if successfull, 0 if not.
int GetFrameRate ( )

Reads the game's framerate.

Returns
Returns the framerate, -1 if an error occured.
int GetScreenSpecs ( int &  width,
int &  height 
)

Reads the game's resolution.

Parameters
[out]widthWidth of the game.
[out]heightHeight of the game.
Returns
1 if successfull, 0 if not.
int HideAllVisual ( )

Hides all overlays.

Returns
1 if successfull, 0 if not.
int ImageCreate ( const char *  path,
int  x,
int  y,
int  rotation,
int  align,
bool  bShow 
)

Creates an image.

Parameters
[in]pathRelativ or absolut path to an image file.
[in]xPosition X scaled on a resolution of 800 x 600
[in]yPosition Y scaled on a resolution of 800 x 600
[in]rotationImage's rotation.
[in]alignImage's alignment.
[in]bShowShould the image be drawed after initialization?
Returns
Gibt die ID zurück, -1 bei einem Fehler.
int ImageDestroy ( int  id)

Destroys an image.

Parameters
[in]idImage's id.
Returns
1 if successfull, 0 if not.
See also
ImageCreate()
int ImageSetAlign ( int  id,
int  align 
)

Sets an image's alignment.

Parameters
[in]idImage's id.
[in]alignNew alignment.
Returns
1 if successfull, 0 if not.
See also
ImageCreate()
int ImageSetPos ( int  id,
int  x,
int  y 
)

Sets an image's position.

Parameters
[in]idImage's id.
[in]xPosition X scaled on a resolution of 800 x 600
[in]yPosition Y scaled on a resolution of 800 x 600
Returns
1 if successfull, 0 if not.
See also
ImageCreate()
int ImageSetRotation ( int  id,
int  rotation 
)

Sets an image's rotation.

Parameters
[in]idImage's id.
[in]rotationNew rotation.
Returns
1 if successfull, 0 if not.
See also
ImageCreate()
int ImageSetShown ( int  id,
bool  bShown 
)

Hides or shows an image.

Parameters
[in]idImage's id.
[in]bShowntrue, if the image should be drawed, otherwise false.
Returns
1 if successfull, 0 if not.
See also
ImageCreate()
int Init ( )

Routine to initialize the API, but it does not have to be explicitly called because it's initialized internally.

Returns
1 if successfull, 0 if not.
int LineCreate ( int  x1,
int  y1,
int  x2,
int  y2,
int  width,
unsigned int  color,
bool  bShow 
)

Creates a line.

Parameters
[in]x1Position X of the first point, scaled on a resolution of 800 x 600.
[in]y1Position Y of the first point, scaled on a resolution of 800 x 600.
[in]x2Position X of the second point, scaled on a resolution of 800 x 600.
[in]y2Position Y of the second point, scaled on a resolution of 800 x 600.
[in]widthLine's width.
[in]colorLine's color (ARGB).
[in]bShowShould the line be drawed after initialization?
Returns
Returns the line's id, return -1, if an error occured.
int LineDestroy ( int  id)

Destroys a line.

Parameters
[in]idLine's id.
Returns
1 if successfull, 0 if not.
int LineSetColor ( int  id,
unsigned int  color 
)

Sets a line's color.

Parameters
[in]idLine's id.
[in]colorNew color (ARGB).
Returns
1 if successfull, 0 if not.
See also
LineCreate()
int LineSetPos ( int  id,
int  x1,
int  y1,
int  x2,
int  y2 
)

Setzt die Position einer Linie

Parameters
[in]idLine's id.
[in]x1Position X of the first point, scaled on a resolution of 800 x 600.
[in]y1Position Y of the first point, scaled on a resolution of 800 x 600.
[in]x2Position X of the second point, scaled on a resolution of 800 x 600.
[in]y2Position Y of the second point, scaled on a resolution of 800 x 600.
Returns
1 if successfull, 0 if not.
See also
LineCreate()
int LineSetShown ( int  id,
bool  bShown 
)

Hides or shows a line.

Parameters
[in]idLine's id.
[in]bShowntrue, if the border should be displayed, otherwise false.
Returns
1 if successfull, 0 if not.
See also
LineCreate()
int LineSetWidth ( int  id,
int  width 
)

Sets a line's width.

Parameters
[in]idLine's id.
[in]widthNew width.
Returns
1 if successfull, 0 if not.
See also
LineCreate()
void SetParam ( const char *  _szParamName,
const char *  _szParamValue 
)

Sets API's parameters.
Possible Parameters for '_szParamName':
"use_window" The API uses the window name instead the process name. default 0.
"process" Name of the process, will be ignored, if 'use_window' is set to '1'.
"window" Name of the window.

Parameters
[in]_szParamNameKey.
[in]_szParamValueValue. This function MUST be called for the proper use of the API.
int ShowAllVisual ( )

Shows all overlays.

Returns
1 if successfull, 0 if not.
int TextCreate ( const char *  Font,
int  FontSize,
bool  bBold,
bool  bItalic,
int  x,
int  y,
unsigned int  color,
const char *  text,
bool  bShadow,
bool  bShow 
)

Creates a text with given parameters.

Parameters
[in]FontName of the font.
[in]FontSizeSize of the font.
[in]bBoldShould the font be bold?
[in]bItalicShould the font be italic?
[in]xPosition X scaled on a resolution of 800 x 600.
[in]yPosition Y scaled on a resolution of 800 x 600.
[in]colorColor of the text (ARGB-Code).
[in]textText of the overlay.
[in]bShadowBlack shadow?
[in]bShowShould the overlay be drawed after the initialization?
Returns
Returns the text's id, return -1, if an error occured.
int TextDestroy ( int  ID)

Destroys a text.

Parameters
[in]IDTextID which should be destroyed.
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextSetColor ( int  id,
unsigned int  color 
)

Set the text's color.

Parameters
[in]idText's id.
[in]colorNew color (ARGB-code).
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextSetPos ( int  id,
int  x,
int  y 
)

Give the text a new position.

Parameters
[in]idText's id.
[in]xPosition X scaled on a resolution of 800 x 600.
[in]yPosition Y scaled on a resolution of 800 x 600.
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextSetShadow ( int  id,
bool  b 
)

Activates / Deactivates the text's shadow.

Parameters
[in]idText's id.
[in]btrue for activation, false for deactivation.
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextSetShown ( int  id,
bool  b 
)

Activates / Deactivates the overlay.

Parameters
[in]idOverlay-ID
[in]btrue for activation, false for deactivation.
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextSetString ( int  id,
const char *  str 
)

Seta a new text.

Parameters
[in]idText's id.
[in]strNew text as a string.
Returns
1 if successfull, 0 if not.
See also
TextCreate()
int TextUpdate ( int  id,
const char *  Font,
int  FontSize,
bool  bBold,
bool  bItalic 
)

Updates a text.

Parameters
[in]idText's id.
[in]FontNew font as a string.
[in]FontSizeSize of the font.
[in]bBoldShould the text be bold?
[in]bItalicShould the text be italic?
Returns
1 if successfull, 0 if not.
See also
TextCreate()