added Magnify/DeMagnify menuitems
This commit is contained in:
parent
28feb18d7e
commit
1cdac6afb2
|
@ -197,6 +197,18 @@ void SetWindowClientSize(HWND hwnd, int cx, int cy) //found at: http://blogs.msd
|
|||
|
||||
}
|
||||
|
||||
void ScaleScreen(float factor)
|
||||
{
|
||||
factor -= 1 ;
|
||||
RECT fullSize,clientSize ;
|
||||
GetWindowRect(hwnd,&fullSize) ;
|
||||
GetClientRect(hwnd,&clientSize) ;
|
||||
fullSize.right += (clientSize.right - clientSize.left) * factor ;
|
||||
fullSize.bottom += (clientSize.bottom - clientSize.top) * factor ;
|
||||
SetWindowPos(hwnd, NULL, 0, 0, fullSize.right - fullSize.left,
|
||||
fullSize.bottom - fullSize.top, SWP_NOMOVE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
void translateXY(s32 *x, s32*y)
|
||||
{
|
||||
s32 tmp;
|
||||
|
@ -1328,6 +1340,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
CheckMenuItem(menu, IDC_ROTATE180, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
CheckMenuItem(menu, IDC_ROTATE270, MF_BYCOMMAND | MF_CHECKED);
|
||||
return 0;
|
||||
case IDC_MAGNIFY:
|
||||
ScaleScreen(1.2f) ; /* 100-> 120% */
|
||||
break ;
|
||||
case IDC_DEMAGNIFY:
|
||||
ScaleScreen(0.833333f) ; /* 120 -> 100% (== 100->83.33%) */
|
||||
break ;
|
||||
|
||||
}
|
||||
return 0;
|
||||
default: /* for messages that we don't deal with */
|
||||
|
|
|
@ -224,5 +224,7 @@ void refreshAll();
|
|||
#define IDC_ROTATE90 1004
|
||||
#define IDC_ROTATE180 1005
|
||||
#define IDC_ROTATE270 1006
|
||||
#define IDC_MAGNIFY 1007
|
||||
#define IDC_DEMAGNIFY 1008
|
||||
|
||||
#endif
|
||||
|
|
|
@ -48,6 +48,18 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "&Pause", IDM_PAUSE
|
||||
MENUITEM "&Reset", IDM_RESET
|
||||
}
|
||||
POPUP "&View"
|
||||
{
|
||||
POPUP "&Rotation"
|
||||
{
|
||||
MENUITEM " 0", IDC_ROTATE0
|
||||
MENUITEM " 90", IDC_ROTATE90
|
||||
MENUITEM "180", IDC_ROTATE180
|
||||
MENUITEM "270", IDC_ROTATE270
|
||||
}
|
||||
MENUITEM "&Magnify", IDC_MAGNIFY
|
||||
MENUITEM "&DeMagnify", IDC_DEMAGNIFY
|
||||
}
|
||||
POPUP "&Outils"
|
||||
{
|
||||
MENUITEM "&Desassembleur", IDM_DISASSEMBLER
|
||||
|
@ -335,6 +347,18 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "&Pause", IDM_PAUSE
|
||||
MENUITEM "&Reset", IDM_RESET
|
||||
}
|
||||
POPUP "&View"
|
||||
{
|
||||
POPUP "&Rotation"
|
||||
{
|
||||
MENUITEM " 0", IDC_ROTATE0
|
||||
MENUITEM " 90", IDC_ROTATE90
|
||||
MENUITEM "180", IDC_ROTATE180
|
||||
MENUITEM "270", IDC_ROTATE270
|
||||
}
|
||||
MENUITEM "&Magnify", IDC_MAGNIFY
|
||||
MENUITEM "&DeMagnify", IDC_DEMAGNIFY
|
||||
}
|
||||
POPUP "&Config"
|
||||
{
|
||||
POPUP "&Save Type"
|
||||
|
@ -346,13 +370,6 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "FRAM 256kbit", IDC_SAVETYPE5
|
||||
MENUITEM "FLASH 2mbit", IDC_SAVETYPE6
|
||||
}
|
||||
POPUP "&Rotation"
|
||||
{
|
||||
MENUITEM " 0", IDC_ROTATE0
|
||||
MENUITEM " 90", IDC_ROTATE90
|
||||
MENUITEM "180", IDC_ROTATE180
|
||||
MENUITEM "270", IDC_ROTATE270
|
||||
}
|
||||
MENUITEM "Control Config", IDM_CONFIG
|
||||
MENUITEM "Sound Settings", IDM_SOUNDSETTINGS
|
||||
POPUP "&Frame Skip"
|
||||
|
|
Loading…
Reference in New Issue