summaryrefslogtreecommitdiffstats
path: root/matchblox/menu/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/menu/button.h')
-rw-r--r--matchblox/menu/button.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/matchblox/menu/button.h b/matchblox/menu/button.h
index d8f1fe5..6ee5388 100644
--- a/matchblox/menu/button.h
+++ b/matchblox/menu/button.h
@@ -8,16 +8,17 @@
#define BUTTON_CLICK_HEIGHT 49
struct ButtonStruct {
- int m_iXPos; // x positie
- int m_iYPos; // y positie
- int m_iCenterWidth; // breedte van middenstuk
- int m_iWidth; // totale breedte
- int m_iHeight; // totale hoogte
- int m_bPressed; // pressed or not
- int m_bHover; // mouse hovering or not
- int m_iType; // button type
- int m_iGroup; // group id for radio buttons
- int m_iId; // button identifier
+ int m_iXPos; // x positie
+ int m_iYPos; // y positie
+ int m_iCenterWidth; // breedte van middenstuk
+ int m_iWidth; // totale breedte
+ int m_iHeight; // totale hoogte
+ int m_bPressed; // pressed or not
+ int m_bHover; // mouse hovering or not
+ int m_iType; // button type
+ int m_iGroup; // group id for radio buttons
+ int m_iId; // button identifier
+ void (*m_fpFunc)(void); // function pointer
// button caption/title
char m_pcTitle[BUTTON_MAX_TITLE];
@@ -30,7 +31,8 @@ struct ButtonStruct {
enum ButtonType {
BUTTON_CLICK,
- BUTTON_RADIO
+ BUTTON_RADIO,
+ BUTTON_LABEL
};
enum ButtonGroup {
@@ -41,7 +43,7 @@ enum ButtonGroup {
BUTTON_GROUP4
};
-struct ButtonStruct ButtonCreate(int f_dXPos, int f_dYPos, int f_dCenterWidth, int f_dHeight, char *f_pcTitle, int f_iType, int f_iGroup, int f_iId);
+struct ButtonStruct ButtonCreate(int f_iXPos, int f_iYPos, int f_iWidth, int f_iHeight, char *f_pcTitle, int f_iType, int f_iGroup, int f_iId, void (*f_fpFunc)(void));
void ButtonRender(struct ButtonStruct *f_sButton);
void ButtonEnter(struct ButtonStruct *f_sButton);
@@ -50,5 +52,7 @@ void ButtonPress(struct ButtonStruct *f_sButton);
void ButtonRelease(struct ButtonStruct *f_sButton);
void ButtonEnable(struct ButtonStruct *f_sButton);
void ButtonDisable(struct ButtonStruct *f_sButton);
+void ButtonExecute(struct ButtonStruct *f_sButton);
+
#endif