]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/bombs/bombs1.cpp
Baked files with Bakefile 0.1.1 using Python 2.3
[wxWidgets.git] / demos / bombs / bombs1.cpp
index cb1a9cc99560c16ee1aa3dfa41c3e96813dc2738..9853fa7fff43fe0bc3b7e4f8b851ee4f5556d46c 100644 (file)
@@ -340,6 +340,10 @@ void BombsCanvas::OnChar(wxKeyEvent& event)
     if ((prevGridFocusX != m_game->m_gridFocusX)
         || (prevGridFocusY != m_game->m_gridFocusY))
     {
+        // cause focused field to be visible after first key hit after launching new game
+        if( m_game->m_gridFocusX < 0 ) m_game->m_gridFocusX = 0;
+        if( m_game->m_gridFocusY < 0 ) m_game->m_gridFocusY = 0;
+
         // refresh previous field and focused field
         RefreshField(prevGridFocusX, prevGridFocusY,
             prevGridFocusX, prevGridFocusY);