Win32 - menu items added: Read only toggle, reload lua script, misc. Menu cleanup

This commit is contained in:
adelikat 2008-12-24 21:11:07 +00:00
parent c7c8ba8074
commit 8540908c8e
3 changed files with 33 additions and 20 deletions

View File

@ -49,9 +49,11 @@ BEGIN
POPUP "Movie" POPUP "Movie"
BEGIN BEGIN
MENUITEM "Record Movie...", MENU_RECORD_MOVIE MENUITEM "Record Movie...", MENU_RECORD_MOVIE
MENUITEM "Replay Movie...", MENU_REPLAY_MOVIE MENUITEM "Play Movie...", MENU_REPLAY_MOVIE
MENUITEM "Stop Movie", MENU_STOP_MOVIE MENUITEM "Stop Movie", MENU_STOP_MOVIE
MENUITEM "Play from beginning", ID_FILE_PLAYMOVIEFROMBEGINNING MENUITEM "Play from beginning", ID_FILE_PLAYMOVIEFROMBEGINNING
MENUITEM SEPARATOR
MENUITEM "Read-only", ID_FILE_MOVIE_TOGGLEREAD
END END
POPUP "Record AVI/Wav" POPUP "Record AVI/Wav"
BEGIN BEGIN
@ -67,6 +69,7 @@ BEGIN
BEGIN BEGIN
MENUITEM "Run Lua Script...", ID_FILE_RUNLUASCRIPT MENUITEM "Run Lua Script...", ID_FILE_RUNLUASCRIPT
MENUITEM "Stop Lua Script", ID_FILE_STOPLUASCRIPT MENUITEM "Stop Lua Script", ID_FILE_STOPLUASCRIPT
MENUITEM "Reload Lua Script", ID_FILE_LUA_RELOADLUASCRIPT
END END
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "E&xit\tAlt+F4", MENU_EXIT MENUITEM "E&xit\tAlt+F4", MENU_EXIT
@ -331,8 +334,8 @@ BEGIN
END END
POPUP "Game+NoMovie" POPUP "Game+NoMovie"
BEGIN BEGIN
MENUITEM "&Replay Movie", FCEUX_CONTEXT_REPLAYMOVIE MENUITEM "&Play Movie", FCEUX_CONTEXT_REPLAYMOVIE
MENUITEM "Record Movie", FCEUX_CONTEXT_RECORDMOVIE MENUITEM "&Record Movie", FCEUX_CONTEXT_RECORDMOVIE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Undo savestate", FCEUX_CONTEXT_UNDOSAVESTATE MENUITEM "Undo savestate", FCEUX_CONTEXT_UNDOSAVESTATE
MENUITEM "Undo loadstate", FCEUX_CONTEXT_UNDOLOADSTATE MENUITEM "Undo loadstate", FCEUX_CONTEXT_UNDOLOADSTATE

View File

@ -642,6 +642,10 @@
#define ID_NOGAME_OPENMOSTRECENTROM 40327 #define ID_NOGAME_OPENMOSTRECENTROM 40327
#define FCEUX_CONTEXT_RECENTROM1 40328 #define FCEUX_CONTEXT_RECENTROM1 40328
#define ID_NES_EMULATION40329 40329 #define ID_NES_EMULATION40329 40329
#define ID_MOVIE_TOGGLEREAD 40330
#define ID_FILE_MOVIE_TOGGLEREAD 40331
#define ID_LUA_RELOADLUASCRIPT 40332
#define ID_FILE_LUA_RELOADLUASCRIPT 40333
#define IDC_DEBUGGER_ICONTRAY 55535 #define IDC_DEBUGGER_ICONTRAY 55535
#define MW_ValueLabel2 65423 #define MW_ValueLabel2 65423
#define MW_ValueLabel1 65426 #define MW_ValueLabel1 65426
@ -651,7 +655,7 @@
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 125 #define _APS_NEXT_RESOURCE_VALUE 125
#define _APS_NEXT_COMMAND_VALUE 40330 #define _APS_NEXT_COMMAND_VALUE 40334
#define _APS_NEXT_CONTROL_VALUE 1199 #define _APS_NEXT_CONTROL_VALUE 1199
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif

View File

@ -318,6 +318,9 @@ void UpdateCheckedMenuItems()
{ {
CheckMenuItem(fceumenu, polo2[x], *polo[x] ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, polo2[x], *polo[x] ? MF_CHECKED : MF_UNCHECKED);
} }
//File Maneu
CheckMenuItem(fceumenu, ID_FILE_MOVIE_TOGGLEREAD, movie_readonly ? MF_CHECKED : MF_UNCHECKED);
//NES Menu //NES Menu
CheckMenuItem(fceumenu, ID_NES_PAUSE, EmulationPaused ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, ID_NES_PAUSE, EmulationPaused ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, ID_NES_TURBO, turbo ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, ID_NES_TURBO, turbo ? MF_CHECKED : MF_UNCHECKED);
@ -972,6 +975,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
case ID_FILE_PLAYMOVIEFROMBEGINNING: case ID_FILE_PLAYMOVIEFROMBEGINNING:
FCEUI_MoviePlayFromBeginning(); FCEUI_MoviePlayFromBeginning();
break; break;
case ID_FILE_MOVIE_TOGGLEREAD:
FCEUI_MovieToggleReadOnly();
break;
//Record Avi/Wav submenu //Record Avi/Wav submenu
case MENU_RECORD_AVI: case MENU_RECORD_AVI:
@ -1000,6 +1006,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
case ID_FILE_STOPLUASCRIPT: case ID_FILE_STOPLUASCRIPT:
FCEU_LuaStop(); FCEU_LuaStop();
break; break;
case ID_FILE_LUA_RELOADLUASCRIPT:
FCEU_ReloadLuaCode();
break;
case MENU_EXIT: case MENU_EXIT:
DoFCEUExit(); DoFCEUExit();
@ -1044,9 +1053,6 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
case ID_NES_NORMALSPEED: case ID_NES_NORMALSPEED:
FCEUD_SetEmulationSpeed(2); FCEUD_SetEmulationSpeed(2);
break; break;
case ID_NES_FASTESTSPEED:
FCEUD_SetEmulationSpeed(4);
break;
//Config Menu----------------------------------------------------------- //Config Menu-----------------------------------------------------------
case MENU_HIDE_MENU: case MENU_HIDE_MENU:
@ -1904,9 +1910,9 @@ void UpdateMenuHotkeys()
combined = "Record Movie...\t" + combo; combined = "Record Movie...\t" + combo;
ChangeMenuItemText(MENU_RECORD_MOVIE, combined); ChangeMenuItemText(MENU_RECORD_MOVIE, combined);
//Replay movie //Play movie
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_MOVIE_REPLAY_FROM]); combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_MOVIE_REPLAY_FROM]);
combined = "Replay Movie...\t" + combo; combined = "Play Movie...\t" + combo;
ChangeMenuItemText(MENU_REPLAY_MOVIE, combined); ChangeMenuItemText(MENU_REPLAY_MOVIE, combined);
//Stop movie //Stop movie
@ -1919,6 +1925,11 @@ void UpdateMenuHotkeys()
combined = "Play from beginning\t" + combo; combined = "Play from beginning\t" + combo;
ChangeMenuItemText(ID_FILE_PLAYMOVIEFROMBEGINNING, combined); ChangeMenuItemText(ID_FILE_PLAYMOVIEFROMBEGINNING, combined);
//Read only
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_MOVIE_READONLY_TOGGLE]);
combined = "Read only\t" + combo;
ChangeMenuItemText(ID_FILE_MOVIE_TOGGLEREAD, combined);
//Screenshot //Screenshot
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SCREENSHOT]); combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SCREENSHOT]);
combined = "Screenshot\t" + combo; combined = "Screenshot\t" + combo;
@ -1934,6 +1945,11 @@ void UpdateMenuHotkeys()
combined = "Stop AVI\t" + combo; combined = "Stop AVI\t" + combo;
ChangeMenuItemText(MENU_STOP_AVI, combined); ChangeMenuItemText(MENU_STOP_AVI, combined);
//Reload Lua Script
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SCRIPT_RELOAD]);
combined = "Reload Lua Script\t" + combo;
ChangeMenuItemText(ID_FILE_LUA_RELOADLUASCRIPT, combined);
//-------------------------------NES---------------------------------------- //-------------------------------NES----------------------------------------
//Reset //Reset
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_RESET]); combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_RESET]);
@ -1965,11 +1981,6 @@ void UpdateMenuHotkeys()
combined = "Pause\t" + combo; combined = "Pause\t" + combo;
ChangeMenuItemText(ID_NES_PAUSE, combined); ChangeMenuItemText(ID_NES_PAUSE, combined);
//Frame Advance
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_FRAME_ADVANCE]);
combined = "Frame Advance\t" + combo;
ChangeMenuItemText(ID_NES_FRAMEADVANCE, combined);
//Turbo //Turbo
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SPEED_TURBO_TOGGLE]); combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SPEED_TURBO_TOGGLE]);
combined = "Turbo\t" + combo; combined = "Turbo\t" + combo;
@ -1995,11 +2006,6 @@ void UpdateMenuHotkeys()
combined = "Normal Speed\t" + combo; combined = "Normal Speed\t" + combo;
ChangeMenuItemText(ID_NES_NORMALSPEED, combined); ChangeMenuItemText(ID_NES_NORMALSPEED, combined);
//Fastest Speed
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_SPEED_FASTEST]);
combined = "Fastest Speed\t" + combo;
ChangeMenuItemText(ID_NES_FASTESTSPEED, combined);
//-------------------------------Config------------------------------------- //-------------------------------Config-------------------------------------
//Hide Menu //Hide Menu
combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_HIDE_MENU_TOGGLE]); combo = GetKeyComboName(FCEUD_CommandMapping[EMUCMD_HIDE_MENU_TOGGLE]);