hgeGUIButton class

hgeGUIButton is a class for button GUI control. To create a hgeGUIButton object you may use this constructor:

hgeGUIButton(
  int       id,
  float     x,
  float     y,
  float     w,
  float     h,
  HTEXTURE  tex,
  float     tx,
  float     ty
);

Parameters

id
Integer identificator for the created control.
x
The button's top-left corner x-coordinate.
y
The button's top-left corner y-coordinate.
w
The buttons's width.
h
The button's height.
tex
A handle of the texture, holding the button's image. The texture must hold two images, one for the button in the unpressed state, and directly to the right from it, the image for the button in pressed state.
tx
The button image's top-left corner texture x-coordinate in pixels.
ty
The button image's top-left corner texture y-coordinate in pixels.

Other methods

SetMode Changes the button's behaviour mode.
SetState Changes the button's state.
GetState Returns the button's state.

Requirements

Header: hgeguictrls.h
Import library: hgehelp.lib