* fixed "X" button in the "Enter New Input" dialog (Hotkey Mapping); changed "Cancel" button to "OK"
* Taseditor: fixed accelerators when editing Notes
This commit is contained in:
parent
5ca09c31d5
commit
e21ed84dfa
|
@ -1,3 +1,7 @@
|
||||||
|
03-Dec-2012 - AnS - Taseditor: fixed accelerators when editing Notes
|
||||||
|
03-Dec-2012 - AnS - fixed "X" button in the "Enter New Input" dialog (Hotkey Mapping); changed "Cancel" button to "OK"
|
||||||
|
03-Dec-2012 - CaH4e3 - fixed mapper 99
|
||||||
|
30-Nov-2012 - CaH4e3 - more mappers to boards conversion
|
||||||
29-Nov-2012 - zeromus - fix "you ling xing dong" by assigning to mapper 192
|
29-Nov-2012 - zeromus - fix "you ling xing dong" by assigning to mapper 192
|
||||||
|
|
||||||
---r2768 - FCEUX 2.2.0 Released---
|
---r2768 - FCEUX 2.2.0 Released---
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
#include "taseditor/taseditor_window.h"
|
#include "taseditor/taseditor_window.h"
|
||||||
|
|
||||||
extern TASEDITOR_WINDOW taseditor_window;
|
extern TASEDITOR_WINDOW taseditor_window;
|
||||||
|
extern bool taseditor_accelerator_keys;
|
||||||
|
|
||||||
//---------------------------
|
//---------------------------
|
||||||
//mbg merge 6/29/06 - new aboutbox
|
//mbg merge 6/29/06 - new aboutbox
|
||||||
|
@ -344,7 +345,7 @@ int BlockingCheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!handled && taseditor_window.hwndTasEditor)
|
if(!handled && taseditor_window.hwndTasEditor && taseditor_accelerator_keys)
|
||||||
{
|
{
|
||||||
if(IsChild(taseditor_window.hwndTasEditor, msg.hwnd))
|
if(IsChild(taseditor_window.hwndTasEditor, msg.hwnd))
|
||||||
handled = TranslateAccelerator(taseditor_window.hwndTasEditor, fceu_hAccel, &msg);
|
handled = TranslateAccelerator(taseditor_window.hwndTasEditor, fceu_hAccel, &msg);
|
||||||
|
|
|
@ -344,15 +344,14 @@ BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch(LOWORD(wParam)) // CaH4e3: BN_CLICKED redundant define removed since it always 0, Esc mapping used to be handled as well (I need it too :))
|
switch(LOWORD(wParam)) // CaH4e3: BN_CLICKED redundant define removed since it always 0, Esc mapping used to be handled as well (I need it too :))
|
||||||
{
|
{
|
||||||
case BTN_CANCEL:
|
case BTN_OK:
|
||||||
key = 0;
|
|
||||||
// Send quit message.
|
// Send quit message.
|
||||||
PostMessage(hwndDlg, WM_USER + 1, 0, 0);
|
PostMessage(hwndDlg, WM_USER + 99, 0, 0);
|
||||||
break;
|
break;
|
||||||
case BTN_CLEAR:
|
case BTN_CLEAR:
|
||||||
key = -1;
|
key = -1;
|
||||||
// Send quit message.
|
// Send quit message.
|
||||||
PostMessage(hwndDlg, WM_USER + 1, 0, 0);
|
PostMessage(hwndDlg, WM_USER + 99, 0, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -375,13 +374,15 @@ BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
}
|
}
|
||||||
else if(NothingPressed() && key)
|
else if(NothingPressed() && key)
|
||||||
{
|
{
|
||||||
PostMessage(hwndDlg, WM_USER+1, 0, 0); // Send quit message.
|
PostMessage(hwndDlg, WM_USER + 99, 0, 0); // Send quit message.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_USER+1:
|
case WM_CLOSE:
|
||||||
{
|
// exit without changing the key mapping
|
||||||
|
key = 0;
|
||||||
|
case WM_USER + 99:
|
||||||
// Done with keyboard.
|
// Done with keyboard.
|
||||||
KeyboardSetBackgroundAccess(false);
|
KeyboardSetBackgroundAccess(false);
|
||||||
|
|
||||||
|
@ -394,7 +395,6 @@ BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
// End the dialog.
|
// End the dialog.
|
||||||
EndDialog(hwndDlg, key);
|
EndDialog(hwndDlg, key);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -840,9 +840,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Enter New Input"
|
CAPTION "Enter New Input"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Cancel",BTN_CANCEL,40,45,50,14
|
|
||||||
CTEXT "Press a key",LBL_KEY_COMBO,31,14,122,20
|
CTEXT "Press a key",LBL_KEY_COMBO,31,14,122,20
|
||||||
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
|
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
|
||||||
|
PUSHBUTTON "OK",BTN_OK,40,45,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
PALCONFIG DIALOGEX 16, 81, 228, 116
|
PALCONFIG DIALOGEX 16, 81, 228, 116
|
||||||
|
|
|
@ -240,6 +240,8 @@
|
||||||
#define IDC_NTVIEW_REFRESH_TRACKBAR 201
|
#define IDC_NTVIEW_REFRESH_TRACKBAR 201
|
||||||
#define IDC_ASSEMBLER_APPLY 201
|
#define IDC_ASSEMBLER_APPLY 201
|
||||||
#define IDI_ICON4 201
|
#define IDI_ICON4 201
|
||||||
|
#define BTN_CLEAR2 201
|
||||||
|
#define BTN_OK 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
|
||||||
|
|
|
@ -32,6 +32,7 @@ using namespace std;
|
||||||
bool emulator_must_run_taseditor = false;
|
bool emulator_must_run_taseditor = false;
|
||||||
bool Taseditor_rewind_now = false;
|
bool Taseditor_rewind_now = false;
|
||||||
bool must_call_manual_lua_function = false;
|
bool must_call_manual_lua_function = false;
|
||||||
|
bool taseditor_accelerator_keys = false;
|
||||||
|
|
||||||
// all Taseditor functional modules
|
// all Taseditor functional modules
|
||||||
TASEDITOR_CONFIG taseditor_config;
|
TASEDITOR_CONFIG taseditor_config;
|
||||||
|
@ -913,15 +914,17 @@ void Taseditor_EMUCMD(int command)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// these functions allow/disallow some FCEUX hotkeys
|
// these functions allow/disallow some FCEUX hotkeys and TAS Editor accelerators
|
||||||
void SetTaseditorInput()
|
void SetTaseditorInput()
|
||||||
{
|
{
|
||||||
|
taseditor_accelerator_keys = true;
|
||||||
// set "Background TAS Editor input"
|
// set "Background TAS Editor input"
|
||||||
KeyboardSetBackgroundAccessBit(KEYBACKACCESS_TASEDITOR);
|
KeyboardSetBackgroundAccessBit(KEYBACKACCESS_TASEDITOR);
|
||||||
JoystickSetBackgroundAccessBit(JOYBACKACCESS_TASEDITOR);
|
JoystickSetBackgroundAccessBit(JOYBACKACCESS_TASEDITOR);
|
||||||
}
|
}
|
||||||
void ClearTaseditorInput()
|
void ClearTaseditorInput()
|
||||||
{
|
{
|
||||||
|
taseditor_accelerator_keys = false;
|
||||||
// clear "Background TAS Editor input"
|
// clear "Background TAS Editor input"
|
||||||
KeyboardClearBackgroundAccessBit(KEYBACKACCESS_TASEDITOR);
|
KeyboardClearBackgroundAccessBit(KEYBACKACCESS_TASEDITOR);
|
||||||
JoystickClearBackgroundAccessBit(JOYBACKACCESS_TASEDITOR);
|
JoystickClearBackgroundAccessBit(JOYBACKACCESS_TASEDITOR);
|
||||||
|
|
|
@ -917,11 +917,7 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
selection.ClearSelection();
|
selection.ClearSelection();
|
||||||
break;
|
break;
|
||||||
case ID_EDIT_SELECTALL:
|
case ID_EDIT_SELECTALL:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
if (piano_roll.drag_mode != DRAG_MODE_SELECTION && piano_roll.drag_mode != DRAG_MODE_DESELECTION)
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
else if (piano_roll.drag_mode != DRAG_MODE_SELECTION && piano_roll.drag_mode != DRAG_MODE_DESELECTION)
|
|
||||||
selection.SelectAll();
|
selection.SelectAll();
|
||||||
break;
|
break;
|
||||||
case ID_SELECTED_UNGREENZONE:
|
case ID_SELECTED_UNGREENZONE:
|
||||||
|
@ -929,38 +925,18 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_X:
|
case ACCEL_CTRL_X:
|
||||||
case ID_EDIT_CUT:
|
case ID_EDIT_CUT:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_CUT, 0, 0);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_CUT, 0, 0);
|
|
||||||
else
|
|
||||||
splicer.Cut();
|
splicer.Cut();
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_C:
|
case ACCEL_CTRL_C:
|
||||||
case ID_EDIT_COPY:
|
case ID_EDIT_COPY:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_COPY, 0, 0);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_COPY, 0, 0);
|
|
||||||
else
|
|
||||||
splicer.Copy();
|
splicer.Copy();
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_V:
|
case ACCEL_CTRL_V:
|
||||||
case ID_EDIT_PASTE:
|
case ID_EDIT_PASTE:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_PASTE, 0, 0);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_PASTE, 0, 0);
|
|
||||||
else
|
|
||||||
splicer.Paste();
|
splicer.Paste();
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_SHIFT_V:
|
case ACCEL_CTRL_SHIFT_V:
|
||||||
case ID_EDIT_PASTEINSERT:
|
case ID_EDIT_PASTEINSERT:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_PASTE, 0, 0);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_PASTE, 0, 0);
|
|
||||||
else
|
|
||||||
splicer.PasteInsert();
|
splicer.PasteInsert();
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_DELETE:
|
case ACCEL_CTRL_DELETE:
|
||||||
|
@ -983,21 +959,6 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
splicer.InsertFrames();
|
splicer.InsertFrames();
|
||||||
break;
|
break;
|
||||||
case ACCEL_DEL:
|
case ACCEL_DEL:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
{
|
|
||||||
DWORD sel_start, sel_end;
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end);
|
|
||||||
if (sel_start == sel_end)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, sel_start, sel_start + 1);
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_CLEAR, 0, 0);
|
|
||||||
} else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
{
|
|
||||||
DWORD sel_start, sel_end;
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end);
|
|
||||||
if (sel_start == sel_end)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, sel_start, sel_start + 1);
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_CLEAR, 0, 0);
|
|
||||||
} else
|
|
||||||
splicer.ClearFrames();
|
splicer.ClearFrames();
|
||||||
break;
|
break;
|
||||||
case ID_EDIT_CLEAR:
|
case ID_EDIT_CLEAR:
|
||||||
|
@ -1181,11 +1142,7 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
taseditor_window.UpdateCheckedItems();
|
taseditor_window.UpdateCheckedItems();
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_A:
|
case ACCEL_CTRL_A:
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
if (piano_roll.drag_mode != DRAG_MODE_SELECTION && piano_roll.drag_mode != DRAG_MODE_DESELECTION)
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
else if (piano_roll.drag_mode != DRAG_MODE_SELECTION && piano_roll.drag_mode != DRAG_MODE_DESELECTION)
|
|
||||||
selection.SelectBetweenMarkers();
|
selection.SelectBetweenMarkers();
|
||||||
break;
|
break;
|
||||||
case ID_EDIT_SELECTMIDMARKERS:
|
case ID_EDIT_SELECTMIDMARKERS:
|
||||||
|
@ -1200,25 +1157,12 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_Z:
|
case ACCEL_CTRL_Z:
|
||||||
case ID_EDIT_UNDO:
|
case ID_EDIT_UNDO:
|
||||||
{
|
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
{
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, WM_UNDO, 0, 0);
|
|
||||||
} else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
{
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, WM_UNDO, 0, 0);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
history.undo();
|
history.undo();
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case ACCEL_CTRL_Y:
|
case ACCEL_CTRL_Y:
|
||||||
case ID_EDIT_REDO:
|
case ID_EDIT_REDO:
|
||||||
{
|
|
||||||
history.redo();
|
history.redo();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case ID_EDIT_SELECTIONUNDO:
|
case ID_EDIT_SELECTIONUNDO:
|
||||||
case ACCEL_CTRL_Q:
|
case ACCEL_CTRL_Q:
|
||||||
{
|
{
|
||||||
|
@ -1300,30 +1244,14 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
break;
|
break;
|
||||||
case ACCEL_HOME:
|
case ACCEL_HOME:
|
||||||
{
|
{
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, 0, 0);
|
|
||||||
else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, 0, 0);
|
|
||||||
else
|
|
||||||
// scroll Piano Roll to the beginning
|
// scroll Piano Roll to the beginning
|
||||||
ListView_Scroll(piano_roll.hwndList, 0, -piano_roll.list_row_height * ListView_GetTopIndex(piano_roll.hwndList));
|
ListView_Scroll(piano_roll.hwndList, 0, -piano_roll.list_row_height * ListView_GetTopIndex(piano_roll.hwndList));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACCEL_END:
|
case ACCEL_END:
|
||||||
{
|
|
||||||
if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_UPPER)
|
|
||||||
{
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETSEL, -1, -1);
|
|
||||||
} else if (markers_manager.marker_note_edit == MARKER_NOTE_EDIT_LOWER)
|
|
||||||
{
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, 0, -1);
|
|
||||||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETSEL, -1, -1);
|
|
||||||
} else
|
|
||||||
{
|
{
|
||||||
// scroll Piano Roll to the end
|
// scroll Piano Roll to the end
|
||||||
ListView_Scroll(piano_roll.hwndList, 0, piano_roll.list_row_height * currMovieData.getNumRecords());
|
ListView_Scroll(piano_roll.hwndList, 0, piano_roll.list_row_height * currMovieData.getNumRecords());
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACCEL_PGUP:
|
case ACCEL_PGUP:
|
||||||
|
@ -1392,9 +1320,11 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
break;
|
break;
|
||||||
case ACCEL_CTRL_LEFT:
|
case ACCEL_CTRL_LEFT:
|
||||||
case ACCEL_SHIFT_LEFT:
|
case ACCEL_SHIFT_LEFT:
|
||||||
|
{
|
||||||
// scroll Piano Roll horizontally to the left
|
// scroll Piano Roll horizontally to the left
|
||||||
ListView_Scroll(piano_roll.hwndList, -COLUMN_BUTTON_WIDTH, 0);
|
ListView_Scroll(piano_roll.hwndList, -COLUMN_BUTTON_WIDTH, 0);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case ACCEL_CTRL_RIGHT:
|
case ACCEL_CTRL_RIGHT:
|
||||||
case ACCEL_SHIFT_RIGHT:
|
case ACCEL_SHIFT_RIGHT:
|
||||||
// scroll Piano Roll horizontally to the right
|
// scroll Piano Roll horizontally to the right
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define PUBLIC_RELEASE // uncommend this when making a public release, but comment back before committing
|
//#define PUBLIC_RELEASE // uncomment this when making a public release, but comment back before committing
|
||||||
|
|
||||||
#ifndef __FCEU_VERSION
|
#ifndef __FCEU_VERSION
|
||||||
#define __FCEU_VERSION
|
#define __FCEU_VERSION
|
||||||
|
|
Loading…
Reference in New Issue