#ifndef _CBUTTON_H #define _CBUTTON_H #include "bitmap.h" #define BUTTON_MAX_TITLE 256 #define BUTTON_MAX_IMGS 3 #define BUTTON_CLICK_HEIGHT 49 struct ButtonStruct { int m_dXPos; // x positie int m_dYPos; // y positie int m_dCenterWidth; // breedte van middenstuk int m_dWidth; // totale breedte int m_dHeight; // totale hoogte int m_bPressed; // pressed or not int m_bHover; // mouse hovering or not int m_iType; // button type // button caption/title char m_pcTitle[BUTTON_MAX_TITLE]; // button images struct BitmapStruct m_psImgNormal[BUTTON_MAX_IMGS]; struct BitmapStruct m_psImgHover[BUTTON_MAX_IMGS]; struct BitmapStruct m_psImgPressed[BUTTON_MAX_IMGS]; }; enum ButtonType { BUTTON_CLICK, BUTTON_RADIO, BUTTON_LABEL }; struct ButtonStruct ButtonCreate(int f_dXPos, int f_dYPos, int f_dCenterWidth, int f_dHeight, char *f_pcTitle, int f_iType); int ButtonGetType(struct ButtonStruct *f_sButton); void ButtonRender(struct ButtonStruct *f_sButton); void ButtonEnter(struct ButtonStruct *f_sButton); void ButtonExit(struct ButtonStruct *f_sButton); void ButtonPress(struct ButtonStruct *f_sButton); void ButtonRelease(struct ButtonStruct *f_sButton); #endif