TASEDit menu changes, WM_COMMAND updated for all windows, all new functions started. Also, help file update

This commit is contained in:
adelikat 2008-07-02 15:40:05 +00:00
parent 1fb1c4b150
commit 548b50d37c
4 changed files with 255 additions and 48 deletions

Binary file not shown.

View File

@ -158,28 +158,33 @@ TASEDITMENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&New Project Ctrl+N", ID_FILE_NEWPROJECTCTRL
MENUITEM "&Open Project... Ctrl+O", ID_FILE_OPENFM2
MENUITEM "&Save Project Ctrl+S", ID_FILE_SAVEPROJECT
MENUITEM "Save Project As... Ctrl+Shift+S", ID_FILE_SAVEAS
MENUITEM "&New Project Ctrl+N", ID_FILE_NEWPROJECT
MENUITEM "&Open Project... Ctrl+O", ID_FILE_OPENPROJECT
MENUITEM "&Save Project Ctrl+S", ID_FILE_SAVEPROJECT
MENUITEM "Save Project As... Ctrl+Shift+S", ID_FILE_SAVEPROJECTAS
MENUITEM SEPARATOR
MENUITEM "Export to FM2", ID_FILE_SAVEFM2
MENUITEM "Import FM2", ID_FILE_IMPORTFM2
MENUITEM "Export to FM2", ID_FILE_EXPORTFM2
MENUITEM SEPARATOR
MENUITEM "Close Ctrl+W", ID_FILE_CLOSECTRL
MENUITEM "Close Ctrl+W", ID_TASEDIT_FILE_CLOSE
END
POPUP "Edit"
BEGIN
MENUITEM "Copy Ctrl+V", ID_EDIT_COPY40165
MENUITEM "Copy to New Ctrl+Shift+V", ID_EDIT_COPYTONEW
MENUITEM "Cut Ctrl+X", ID_EDIT_CUT40167
MENUITEM "Paste Ctrl+V", ID_EDIT_PASTE40166
MENUITEM "Delete", ID_EDIT_DELETE
MENUITEM "Truncate", ID_EDIT_TRUNCATE
MENUITEM "Select All", ID_EDIT_SELECTALL
MENUITEM SEPARATOR
MENUITEM "Add Marker", ID_Menu40175
MENUITEM "Remove Marker", ID_Menu40176
MENUITEM "Cut Ctrl+X", ID_TASEDIT_CUT
MENUITEM "Copy Ctrl+C", ID_TASEDIT_COPY
MENUITEM "Paste Ctrl+V", ID_TASEDIT_PASTE
MENUITEM "Paste to New Ctrl+Shift+V", ID_TASEDIT_PASTETONEW
MENUITEM "Delete Ctrl+Delete", ID_TASEDIT_DELETE
MENUITEM SEPARATOR
MENUITEM "Add Marker", ID_EDIT_ADDMARKER
MENUITEM "Remove Marker", ID_EDIT_REMOVEMARKER
MENUITEM SEPARATOR
MENUITEM "Truncate Ctrl+T", ID_EDIT_TRUNCATE
MENUITEM "Branch Ctrl+B", ID_EDIT_BRANCH
END
MENUITEM "View", 0
MENUITEM "View", ID_VIEW
POPUP "Help"
BEGIN
MENUITEM "TASEdit Help", ID_HELP_TASEDITHELP
@ -250,19 +255,22 @@ TASEDITCONTEXTMENUS MENU
BEGIN
POPUP "Stray"
BEGIN
MENUITEM "&Insert Frames", MENU_STRAY_INSERTFRAMES
MENUITEM "&Insert Frames", MENU_CONTEXT_STRAY_INSERTFRAMES
MENUITEM SEPARATOR
MENUITEM "Truncate", ID_STRAY_TRUNCATE
MENUITEM "Truncate", ID_CONTEXT_STRAY_TRUNCATE
END
POPUP "Selected"
BEGIN
MENUITEM "Insert Frame(s)", MENU_INSERTFRAMES
MENUITEM "Delete Frame(s)", MENU_DELETEFRAMES
MENUITEM "Insert Frame(s)", ID_CONTEXT_SELECTED_INSERTFRAMES
MENUITEM "Delete Frame(s)", ID_CONTEXT_SELECTED_DELETEFRAMES
MENUITEM SEPARATOR
MENUITEM "Copy to new inputlog", ID_SELECTED_CREATEMACRO
MENUITEM "Insert Marker", ID_SELECTED_INSERTMARKER
MENUITEM "Branch", ID_SELECTED_BRANCH
MENUITEM "Truncate", ID_Menu
MENUITEM "Paste to New", ID_CONTEXT_SELECTED_PASTETONEW
MENUITEM SEPARATOR
MENUITEM "Add Marker", ID_CONTEXT_SELECTED_ADDMARKER
MENUITEM "Remove Marker", ID_CONTEXT_SELECTED_REMOVEMARKER
MENUITEM SEPARATOR
MENUITEM "Truncate", ID_CONTEXT_SELECTED_TRUNCATE
MENUITEM "Branch", ID_CONTEXT_SELECTED_BRANCH
END
END
@ -1690,13 +1698,19 @@ END
IDR_ACCELERATOR1 ACCELERATORS
BEGIN
"C", ACCEL_CTRL_C, VIRTKEY, CONTROL, NOINVERT
"E", ACCEL_CTRL_E, VIRTKEY, CONTROL, NOINVERT
"N", ACCEL_CTRL_N, VIRTKEY, CONTROL, NOINVERT
"O", ACCEL_CTRL_O, VIRTKEY, CONTROL, NOINVERT
"S", ACCEL_CTRL_S, VIRTKEY, CONTROL, NOINVERT
"S", ACCEL_CTRL_SHIFT_S, VIRTKEY, SHIFT, CONTROL, NOINVERT
"W", ACCEL_CTRL_W, VIRTKEY, CONTROL, NOINVERT
"C", ACCEL_CTRL_C, VIRTKEY, CONTROL, NOINVERT
"X", ACCEL_CTRL_X, VIRTKEY, CONTROL, NOINVERT
"V", ACCEL_CTRL_V, VIRTKEY, CONTROL, NOINVERT
"V", ACCEL_CTRL_SHIFT_V, VIRTKEY, SHIFT, CONTROL, NOINVERT
VK_DELETE, ACCEL_CTRL_DELETE, VIRTKEY, CONTROL, NOINVERT
"T", ACCEL_CTRL_T, VIRTKEY, CONTROL, NOINVERT
"B", ACCEL_CTRL_B, VIRTKEY, CONTROL, NOINVERT
END

View File

@ -570,6 +570,43 @@
#define ID_Menu40175 40175
#define ID_Menu40176 40176
#define ID_EDIT_TRUNCATE 40177
#define ID_FILE_IMPORTFM2 40178
#define ID_FILE_NEWPROJECT 40179
#define ID_FILE_OPEN_PROJECT 40180
#define ID_FILE_OPENPROJECT 40181
#define ID_FILE_SAVEPROJECTAS 40182
#define ID_FILE_EXPORTFM2 40183
#define ACCEL_CTRL_X 40184
#define ID_EDIT_ADDMARKER 40186
#define ID_EDIT_REMOVE_MARKER 40187
#define ID_TASEDIT_CUT 40188
#define ID_TASEDIT_COPY 40189
#define ID_TASEDIT_COPYTONEW 40190
#define ID_TASEDIT_PASTE 40191
#define ID_TASEDIT_DELETE 40192
#define ID_TASEDIT_FILE_CLOSE 40193
#define ID_TASEDIT_PASTETONEW 40194
#define ACCEL_CTRL_V 40195
#define ACCEL_CTRL_SHIFT_V 40196
#define ACCEL_CTRL_DELETE 40197
#define ID_ACCEL_CTRL_T 40198
#define ACCEL_CTRL_T 40198
#define ACCEL_CTRL_B 40199
#define ID_CONTEXT_SELECTED_TRUNCATE 40200
#define ID_CONTEXT_STRAY_TRUNCATE 40201
#define ID_VIEW 40202
#define MENU_CONTEXT_STRAY_INSERTFRAMES 40203
#define ID_CONTEXT_SELECTED_INSERTFRAMES 40204
#define ID_CONTEXT_SELECTED_DELETEFRAMES 40205
#define ID_SELECTED_REMOVEMARKER 40206
#define ID_CONTEXT_SELECTED_PASTETONEW 40207
#define ID_CONTEXT_SELECTED_ADDMARKER 40208
#define ID_CONTEXT_SELECTED_REMOVEMARKER 40209
#define ID_CONTEXT_SELECTED_BRANCH 40210
#define ID_EDIT_BRANCHCTRL 40211
#define ID_EDIT_BRANCH 40212
#define ID_EDIT_SELECTALL 40214
#define ID_EDIT_REMOVEMARKER 40215
#define MW_ValueLabel2 65423
#define MW_ValueLabel1 65426
#define GUI_BOT_DEBUG 65436
@ -580,7 +617,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 121
#define _APS_NEXT_COMMAND_VALUE 40178
#define _APS_NEXT_COMMAND_VALUE 40216
#define _APS_NEXT_CONTROL_VALUE 1150
#define _APS_NEXT_SYMED_VALUE 101
#endif

View File

@ -360,11 +360,52 @@ static void ColumnSet(int column)
RedrawList();
}
//Highlights all frames in current input log
static void SelectAll()
{
}
//cuts the current selection and copies to the clipboard
static void Cut()
{
}
//copies the current selection to the clipboard
static void Copy()
{
}
//pastes the current clipboard selection into current inputlog
static void Paste()
{
}
//pastes the current clipboard selection into a new inputlog
static void PastetoNew()
{
}
//removes the current selection (does not put in clipboard)
static void Delete()
{
}
//Adds a marker to left column at selected frame (if multiple frames selected, it is placed at end of selection)
void AddMarker()
{
}
//Removes marker from selected frame (if multiple frames selected, all markers in selection removed?
void RemoveMarker()
{
}
//Makes new branch (timeline), takes current frame and creates new input log of all frames before it, new input log will be in focus
void Branch()
{
}
//The subclass wndproc for the listview header
static LRESULT APIENTRY HeaderWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
@ -471,11 +512,49 @@ static void InitDialog()
void KillTasEdit()
{
//TODO: determine if project has changed, and ask to save changes
DestroyWindow(hwndTasEdit);
hwndTasEdit = 0;
FCEUMOV_ExitTasEdit();
}
//Creates a new TASEdit Project
static void NewProject()
{
//determine if current project changed
//if so, ask to save changes
//close current project
//create new project
}
//Opens a new Project file
static void OpenProject()
{
//determine if current project changed
//if so, ask to save changes
//close current project
//open dialog for new project file
}
//Saves current project
static void SaveProject()
{
//determine if file exists, if not, do SaveProjectAs()
//Save work, flag project as not changed
}
static void SaveProjectAs()
{
//Save project as new user selected filename
//flag project as not changed
}
//Takes a selected .fm2 file and adds it to the Project inputlog
static void Import()
{
}
//Takes current inputlog and saves it as a .fm2 file
static void Export()
{
const char filter[]="FCEUX Movie File(*.fm2)\0*.fm2\0";
@ -590,7 +669,7 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
}
break;
case WM_CLOSE:
case WM_QUIT:
KillTasEdit();
@ -599,13 +678,101 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case WM_COMMAND:
switch(LOWORD(wParam))
{
case MENU_DELETEFRAMES:
DeleteFrames();
case ACCEL_CTRL_N:
case ID_FILE_NEWPROJECT:
NewProject();
break;
case MENU_INSERTFRAMES:
InsertFrames();
case ACCEL_CTRL_O:
case ID_FILE_OPENPROJECT:
Replay_LoadMovie(true); //TODO: change function name to LoadProject(true)?
break;
case MENU_STRAY_INSERTFRAMES:
case ACCEL_CTRL_S:
case ID_FILE_SAVEPROJECT:
SaveProject();
break;
case ACCEL_CTRL_SHIFT_S:
case ID_FILE_SAVEPROJECTAS:
SaveProjectAs();
break;
case ID_FILE_IMPORTFM2:
Import();
break;
case ID_FILE_EXPORTFM2:
Export();
break;
case ACCEL_CTRL_W:
case ID_TASEDIT_FILE_CLOSE:
KillTasEdit();
break;
case ID_EDIT_SELECTALL:
SelectAll();
break;
case ACCEL_CTRL_X:
case ID_TASEDIT_CUT:
Cut();
break;
case ACCEL_CTRL_C:
case ID_TASEDIT_COPY:
Copy();
break;
case ACCEL_CTRL_V:
case ID_TASEDIT_PASTE:
Paste();
break;
case ACCEL_CTRL_SHIFT_V: //Takes selected frames and creates new inputlog files
case ID_TASEDIT_PASTETONEW:
case ID_CONTEXT_SELECTED_PASTETONEW:
PastetoNew();
break;
case ACCEL_CTRL_DELETE:
case ID_TASEDIT_DELETE:
Delete();
break;
case ID_EDIT_ADDMARKER:
case ID_CONTEXT_SELECTED_ADDMARKER:
AddMarker();
break;
case ID_EDIT_REMOVEMARKER:
case ID_CONTEXT_SELECTED_REMOVEMARKER:
RemoveMarker();
break;
case ACCEL_CTRL_T:
case ID_EDIT_TRUNCATE:
case ID_CONTEXT_SELECTED_TRUNCATE:
case ID_CONTEXT_STRAY_TRUNCATE:
case IDC_HACKY1:
//hacky1: delete all items after the current selection
currMovieData.records.resize(currFrameCounter+1);
InvalidateGreenZone(currFrameCounter);
UpdateTasEdit();
break;
case ACCEL_CTRL_B:
case ID_EDIT_BRANCH:
case ID_CONTEXT_SELECTED_BRANCH:
Branch();
break;
case ID_HELP_TASEDITHELP:
//link to TASEdit in help menu
break;
case MENU_CONTEXT_STRAY_INSERTFRAMES:
{
int frames;
if(CWin32InputBox::GetInteger("Insert Frames", "How many frames?", frames, hwndDlg) == IDOK)
@ -615,28 +782,17 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
}
break;
case IDC_HACKY1:
//hacky1: delete all items after the current selection
currMovieData.records.resize(currFrameCounter+1);
InvalidateGreenZone(currFrameCounter);
UpdateTasEdit();
case ID_CONTEXT_SELECTED_INSERTFRAMES:
InsertFrames();
break;
case ID_FILE_OPENFM2:
Replay_LoadMovie(true);
case ID_CONTEXT_SELECTED_DELETEFRAMES:
DeleteFrames();
break;
case ID_FILE_SAVEFM2:
Export();
break;
case ACCEL_CTRL_C:
Copy();
break;
case ACCEL_CTRL_W:
KillTasEdit();
break;
}
break;
}