X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fbuttons.c;h=d3eb443adb263bd85aeab0bf176ed36c3c31c6d2;hb=a4bf969413cdda68ab8bb54a2a1181bdc09cf63a;hp=282481bd68f853b28a245cc6656bd6750c305937;hpb=2fe0fbc2a34fd4b50081f1829931dea3ca2c4c1c;p=rocksndiamonds.git diff --git a/src/buttons.c b/src/buttons.c index 282481bd..d3eb443a 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -84,6 +84,19 @@ void DrawVideoDisplay(unsigned long state, unsigned long value) 0,0 }} }; + if (state & VIDEO_STATE_PBEND_OFF) + { + int cx = DOOR_GFX_PAGEX3, cy = DOOR_GFX_PAGEY2; + + XCopyArea(display,pix[PIX_DOOR],drawto,gc, + cx + VIDEO_REC_LABEL_XPOS, + cy + VIDEO_REC_LABEL_YPOS, + VIDEO_PBEND_LABEL_XSIZE, + VIDEO_PBEND_LABEL_YSIZE, + VX + VIDEO_REC_LABEL_XPOS, + VY + VIDEO_REC_LABEL_YPOS); + } + for(i=0;i<20;i++) { if (state & (1<=0 && pressed) { pressed = FALSE; - DrawYesNoButton(yesno_button[choice] | BUTTON_RELEASED); + DrawYesNoButton(yesno_button[choice] | BUTTON_RELEASED, DB_NORMAL); } else if (ON_YESNO_BUTTON(mx,my) && YESNO_BUTTON(mx)==choice && !pressed) { pressed = TRUE; - DrawYesNoButton(yesno_button[choice] | BUTTON_PRESSED); + DrawYesNoButton(yesno_button[choice] | BUTTON_PRESSED, DB_NORMAL); } } } @@ -716,7 +773,7 @@ int CheckYesNoButtons(int mx, int my, int button) { if (ON_YESNO_BUTTON(mx,my) && YESNO_BUTTON(mx)==choice && pressed) { - DrawYesNoButton(yesno_button[choice] | BUTTON_RELEASED); + DrawYesNoButton(yesno_button[choice] | BUTTON_RELEASED, DB_NORMAL); return_code = choice+1; choice = -1; pressed = FALSE; @@ -736,7 +793,7 @@ int CheckConfirmButton(int mx, int my, int button) { int return_code = 0; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; if (button) { @@ -746,7 +803,7 @@ int CheckConfirmButton(int mx, int my, int button) { choice = 0; pressed = TRUE; - DrawConfirmButton(BUTTON_PRESSED); + DrawConfirmButton(BUTTON_PRESSED, DB_NORMAL); } } else /* Mausbewegung bei gedrückter Maustaste */ @@ -754,12 +811,12 @@ int CheckConfirmButton(int mx, int my, int button) if (!ON_CONFIRM_BUTTON(mx,my) && choice>=0 && pressed) { pressed = FALSE; - DrawConfirmButton(BUTTON_RELEASED); + DrawConfirmButton(BUTTON_RELEASED, DB_NORMAL); } else if (ON_CONFIRM_BUTTON(mx,my) && !pressed) { pressed = TRUE; - DrawConfirmButton(BUTTON_PRESSED); + DrawConfirmButton(BUTTON_PRESSED, DB_NORMAL); } } } @@ -767,7 +824,7 @@ int CheckConfirmButton(int mx, int my, int button) { if (ON_CONFIRM_BUTTON(mx,my) && pressed) { - DrawConfirmButton(BUTTON_RELEASED); + DrawConfirmButton(BUTTON_RELEASED, DB_NORMAL); return_code = BUTTON_CONFIRM; choice = -1; pressed = FALSE; @@ -787,7 +844,7 @@ int CheckPlayerButtons(int mx, int my, int button) { int return_code = 0; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; int player_state[4] = { BUTTON_PLAYER_1, @@ -848,7 +905,7 @@ int CheckEditButtons(int mx, int my, int button) { int return_code = 0; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; static int edit_button[6] = { ED_BUTTON_CTRL, @@ -918,7 +975,7 @@ int CheckCtrlButtons(int mx, int my, int button) { int return_code = 0; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; static int ctrl_button[4] = { ED_BUTTON_EDIT, @@ -977,7 +1034,7 @@ int CheckElemButtons(int mx, int my, int button) { int return_code = -1; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; if (button) { @@ -1038,7 +1095,7 @@ int CheckCountButtons(int mx, int my, int button) { int return_code = -1; static int choice = -1; - static BOOL pressed = FALSE; + static boolean pressed = FALSE; if (button) {