Ability to cancel keys input dialog
This commit is contained in:
parent
b88be3a9ee
commit
8733067f5b
|
@ -1148,6 +1148,7 @@ static void ClearExtraMeta(int* key)
|
||||||
|
|
||||||
static int DWBStarted;
|
static int DWBStarted;
|
||||||
static ButtConfig *DWBButtons;
|
static ButtConfig *DWBButtons;
|
||||||
|
static ButtConfig DWBButtonsBackup;
|
||||||
static const char *DWBText;
|
static const char *DWBText;
|
||||||
static uint8 DWBFirstPress;
|
static uint8 DWBFirstPress;
|
||||||
|
|
||||||
|
@ -1259,6 +1260,7 @@ static INT_PTR CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
key = 0;
|
key = 0;
|
||||||
DWBFirstPress = 1;
|
DWBFirstPress = 1;
|
||||||
memset(keyonce, 0, sizeof(keyonce));
|
memset(keyonce, 0, sizeof(keyonce));
|
||||||
|
memcpy(&DWBButtonsBackup, DWBButtons, sizeof(ButtConfig));
|
||||||
SetWindowText(hwndDlg, (char*)DWBText); //mbg merge 7/17/06 added cast
|
SetWindowText(hwndDlg, (char*)DWBText); //mbg merge 7/17/06 added cast
|
||||||
BeginJoyWait(hwndDlg);
|
BeginJoyWait(hwndDlg);
|
||||||
KeyboardSetBackgroundAccess(true);
|
KeyboardSetBackgroundAccess(true);
|
||||||
|
@ -1289,6 +1291,9 @@ static INT_PTR CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
free(nstr);
|
free(nstr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BTN_CANCEL:
|
||||||
|
memcpy(DWBButtons, &DWBButtonsBackup, sizeof(ButtConfig));
|
||||||
|
goto gornk;
|
||||||
case BTN_CLOSE:
|
case BTN_CLOSE:
|
||||||
gornk:
|
gornk:
|
||||||
KillTimer(hwndDlg,666);
|
KillTimer(hwndDlg,666);
|
||||||
|
|
|
@ -114,7 +114,8 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Press a key or a button",LBL_DWBDIALOG_TEXT,7,9,237,8
|
LTEXT "Press a key or a button",LBL_DWBDIALOG_TEXT,7,9,237,8
|
||||||
PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
|
PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
|
||||||
PUSHBUTTON "OK",BTN_CLOSE,188,33,50,14
|
PUSHBUTTON "Cancel",BTN_CANCEL,126,32,50,14
|
||||||
|
PUSHBUTTON "OK",BTN_CLOSE,188,32,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
FKBDIALOG DIALOGEX 13, 72, 402, 194
|
FKBDIALOG DIALOGEX 13, 72, 402, 194
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
#define LBL_KEY_COMBO 100
|
#define LBL_KEY_COMBO 100
|
||||||
#define LBL_CDLOGGER_CODECOUNT 100
|
#define LBL_CDLOGGER_CODECOUNT 100
|
||||||
#define CHECK_PALETTE_ENABLED 100
|
#define CHECK_PALETTE_ENABLED 100
|
||||||
#define LBL_DWBDIALOG_TEXT 100 | WS_TABSTOP
|
|
||||||
#define GRP_GAMEPAD1 100
|
#define GRP_GAMEPAD1 100
|
||||||
#define IDC_TRACER_LOG 100
|
#define IDC_TRACER_LOG 100
|
||||||
#define MENU_MV_FILE_SAVE 100
|
#define MENU_MV_FILE_SAVE 100
|
||||||
#define IDC_ROMPATCHER_OFFSET_BOX 100
|
#define IDC_ROMPATCHER_OFFSET_BOX 100
|
||||||
#define IDC_ASSEMBLER_HISTORY 100
|
#define IDC_ASSEMBLER_HISTORY 100
|
||||||
|
#define LBL_DWBDIALOG_TEXT 100
|
||||||
#define MENU_CLOSE_FILE 101
|
#define MENU_CLOSE_FILE 101
|
||||||
#define CB_DISABLE_SPEED_THROTTLING 101
|
#define CB_DISABLE_SPEED_THROTTLING 101
|
||||||
#define LBL_CDLOGGER_DATACOUNT 101
|
#define LBL_CDLOGGER_DATACOUNT 101
|
||||||
|
@ -246,6 +246,7 @@
|
||||||
#define IDI_ICON4 201
|
#define IDI_ICON4 201
|
||||||
#define BTN_OK 201
|
#define BTN_OK 201
|
||||||
#define BUTTON_BATTERY 201
|
#define BUTTON_BATTERY 201
|
||||||
|
#define BTN_CLEAR2 201
|
||||||
#define MENU_EJECT_DISK 202
|
#define MENU_EJECT_DISK 202
|
||||||
#define TXT_FAM 202
|
#define TXT_FAM 202
|
||||||
#define MENU_MV_EDIT_PASTE 202
|
#define MENU_MV_EDIT_PASTE 202
|
||||||
|
|
Loading…
Reference in New Issue