Commit dbcc37ba authored by Oleg Prokhorov's avatar Oleg Prokhorov Committed by Alexandre Julliard

- key accelerators for "New Game" and exit

- auto flag after successful game those entries which were not flagged by player during the game himself
parent bf6df050
......@@ -30,7 +30,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Options" {
MENUITEM "&New", IDM_NEW
MENUITEM "&New\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Mark Question", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -39,7 +39,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Expert", IDM_EXPERT
MENUITEM "&Custom", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
MENUITEM "E&xit\tAlt+X", IDM_EXIT
}
POPUP "&Info" {
MENUITEM "&Fastest Times", IDM_TIMES
......
......@@ -29,7 +29,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Opciones" {
MENUITEM "&Nuevo", IDM_NEW
MENUITEM "&Nuevo\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Interrogacin", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -38,7 +38,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Experto", IDM_EXPERT
MENUITEM "P&ersonalizado", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "&Salir", IDM_EXIT
MENUITEM "&Salir\tAlt+X", IDM_EXIT
}
POPUP "&Ayuda" {
MENUITEM "&Mejores tiempos", IDM_TIMES
......
......@@ -31,7 +31,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Options" {
MENUITEM "&Nouveau", IDM_NEW
MENUITEM "&Nouveau\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "Points d'interro&gation", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -40,7 +40,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Expert", IDM_EXPERT
MENUITEM "&Personnalis...", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "&Quitter", IDM_EXIT
MENUITEM "&Quitter\tAlt+X", IDM_EXIT
}
POPUP "&Info" {
MENUITEM "&Temps les plus rapides", IDM_TIMES
......
......@@ -31,7 +31,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Opzioni" {
MENUITEM "&Nuovo", IDM_NEW
MENUITEM "&Nuovo\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Contrassegna domanda", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -40,7 +40,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Esperto", IDM_EXPERT
MENUITEM "&Presonalizza", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "E&sci", IDM_EXIT
MENUITEM "E&sci\Alt+X", IDM_EXIT
}
POPUP "&Informazioni" {
MENUITEM "&Tempi migliori", IDM_TIMES
......
......@@ -28,7 +28,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Opties" {
MENUITEM "&Nieuw spel", IDM_NEW
MENUITEM "&Nieuw spel\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Markeer vraag", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -37,7 +37,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Expert", IDM_EXPERT
MENUITEM "Aa&ngepast spel", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "&Afsluiten", IDM_EXIT
MENUITEM "&Afsluiten\tAlt+X", IDM_EXIT
}
POPUP "&Info" {
MENUITEM "&Snelste tijden", IDM_TIMES
......
......@@ -29,7 +29,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Opes" {
MENUITEM "&Novo", IDM_NEW
MENUITEM "&Novo\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Marcas", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -38,7 +38,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Experiente", IDM_EXPERT
MENUITEM "Personali&zar...", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "Sai&r", IDM_EXIT
MENUITEM "Sai&r\tAlt+X", IDM_EXIT
}
POPUP "Aj&uda" {
MENUITEM "&Melhores tempos", IDM_TIMES
......
......@@ -29,7 +29,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&" {
MENUITEM "& ", IDM_NEW
MENUITEM "& \tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "& ", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -38,7 +38,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&", IDM_EXPERT
MENUITEM " &", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "&", IDM_EXIT
MENUITEM "&\tAlt+X", IDM_EXIT
}
POPUP "&" {
MENUITEM "& ", IDM_TIMES
......
......@@ -29,7 +29,7 @@ STRINGTABLE {
MENU_WINEMINE MENU DISCARDABLE
{
POPUP "&Monosti" {
MENUITEM "&Nova igra", IDM_NEW
MENUITEM "&Nova igra\tF2", IDM_NEW
MENUITEM SEPARATOR
MENUITEM "&Vpraaji", IDM_MARKQ
MENUITEM SEPARATOR
......@@ -38,7 +38,7 @@ MENU_WINEMINE MENU DISCARDABLE
MENUITEM "&Strokovnjak", IDM_EXPERT
MENUITEM "&Poljubno", IDM_CUSTOM
MENUITEM SEPARATOR
MENUITEM "Iz&hod", IDM_EXIT
MENUITEM "Iz&hod\tAlt+X", IDM_EXIT
}
POPUP "&Info" {
MENUITEM "&Najbolji asi", IDM_TIMES
......
......@@ -72,7 +72,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
ShowWindow( hWnd, cmdshow );
UpdateWindow( hWnd );
haccel = LoadAccelerators( hInst, appname );
haccel = LoadAccelerators( hInst, MAKEINTRESOURCE(IDA_WINEMINE) );
SetTimer( hWnd, ID_TIMER, 1000, NULL );
while( GetMessage(&msg, NULL_HANDLE, 0, 0) ) {
......@@ -790,6 +790,7 @@ void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board )
void TestBoard( HWND hWnd, BOARD *p_board, unsigned x, unsigned y, int msg )
{
POINT pt;
unsigned col,row;
pt.x = x;
pt.y = y;
......@@ -808,6 +809,20 @@ void TestBoard( HWND hWnd, BOARD *p_board, unsigned x, unsigned y, int msg )
if( p_board->boxes_left == 0 ) {
p_board->status = WON;
if (p_board->num_flags < p_board->mines) {
for( row = 1; row <= p_board->rows; row++ ) {
for( col = 1; col <= p_board->cols; col++ ) {
if (p_board->box[col][row].IsMine && p_board->box[col][row].FlagType != FLAG)
p_board->box[col][row].FlagType = FLAG;
}
}
p_board->num_flags = p_board->mines;
RedrawWindow( p_board->hWnd, NULL, NULL_HANDLE,
RDW_INVALIDATE | RDW_UPDATENOW );
}
if( p_board->difficulty != CUSTOM &&
p_board->time < p_board->best_time[p_board->difficulty] ) {
p_board->best_time[p_board->difficulty] = p_board->time;
......
......@@ -46,3 +46,5 @@
#define IDC_EDITMINES 1033
#define IDS_APPNAME 1101
#define IDA_WINEMINE 1201
......@@ -31,6 +31,13 @@
#include "Ru.rc"
#include "Si.rc"
IDA_WINEMINE ACCELERATORS DISCARDABLE
{
VK_F2, IDM_NEW, VIRTKEY, NOINVERT
"X", IDM_EXIT, VIRTKEY, ALT, NOINVERT
}
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
/* BINRES winemine.ico */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment