#include <Button.h>
Public Member Functions | |
CButton () | |
Basic button constructor. | |
~CButton () | |
Basic button destructor. | |
virtual bool | Init (RECT box, bool visible, bool enabled, WCHAR *caption, RECT textBox, IDirectSound8 *pDS, LPWSTR clickSoundFilename, LPWSTR focusSoundFilename, int type) |
Initialize button object. | |
virtual bool | OnEvent (UINT uMsg, WPARAM wParam, LPARAM lParam) |
OnEvent should handle events like mouse click and mouse over. For button to handle these events, button class must contain info about button position, size, etc. | |
virtual void | OnRender (LPDIRECT3DDEVICE9 pd3dDevice) |
OnRender is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal). | |
virtual void | OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, float fElapsedTime) |
OnFrameMove is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal). | |
void | SetFocus (bool focus) |
This function sets focus on button. | |
void | OnButtonPress () |
Button press function. |
All other button classes inherit functionality from this basic button class.
CButton::CButton | ( | ) |
Basic button constructor.
CButton::~CButton | ( | ) |
Basic button destructor.
bool CButton::Init | ( | RECT | box, | |
bool | visible, | |||
bool | enabled, | |||
WCHAR * | caption, | |||
RECT | textBox, | |||
IDirectSound8 * | pDS, | |||
LPWSTR | clickSoundFilename, | |||
LPWSTR | focusSoundFilename, | |||
int | type | |||
) | [virtual] |
Initialize button object.
type | MPE_BUTTON_TYPE enum variable. |
bool CButton::OnEvent | ( | UINT | uMsg, | |
WPARAM | wParam, | |||
LPARAM | lParam | |||
) | [virtual] |
OnEvent should handle events like mouse click and mouse over. For button to handle these events, button class must contain info about button position, size, etc.
Reimplemented in C2DButton.
void CButton::OnRender | ( | LPDIRECT3DDEVICE9 | pd3dDevice | ) | [virtual] |
OnRender is stub for basic button class, it is implemented in classes who inherit CButton. (Should be declared virutal).
pd3dDevice | DirectX 3D device. |
void CButton::OnFrameMove | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
float | fElapsedTime | |||
) | [virtual] |
void CButton::SetFocus | ( | bool | focus | ) |
This function sets focus on button.
focus | true if button is selected. |
void CButton::OnButtonPress | ( | ) |
Button press function.