diff options
Diffstat (limited to 'src/MainWindow.cpp')
| -rw-r--r-- | src/MainWindow.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index e831d89..5c1a87f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -19,25 +19,32 @@ MainWindow::MainWindow() wxMenu *menuFile = new wxMenu; menuFile->Append(1, "Open", "Open file"); Bind(wxEVT_MENU, &MainWindow::OnOpen, this, 1); + menuFile->AppendSeparator(); + menuFile->Append(10, "Save", "Save current game"); + menuFile->Append(11, "Save As", "Save current game as"); + menuFile->AppendSeparator(); menuFile->Append(4, "Settings", "Configure OChess"); Bind(wxEVT_MENU, &MainWindow::OnSettings, this, 4); menuFile->AppendSeparator(); menuFile->Append(wxID_EXIT); Bind(wxEVT_MENU, &MainWindow::OnExit, this, wxID_EXIT); + // Game menu menuGame = new wxMenu; menuGame->Append(2, "New", "Create new game"); Bind(wxEVT_MENU, &MainWindow::OnMenuNewGame, this, 2); menuGame->Append(3, "New from FEN", "Create new game using FEN"); Bind(wxEVT_MENU, &MainWindow::OnMenuNewGame, this, 3); - menuGame->AppendSeparator(); - menuGame->Append(10, "Save", "Save current game"); - menuGame->Append(11, "Save As", "Save current game as"); + + // Game base menu + wxMenu *menuBase = new wxMenu; + menuBase->Append(5, "New", "Create new database"); /// Menu bar menuBar = new wxMenuBar; menuBar->Append(menuFile, "&File"); menuBar->Append(menuGame, "&Game"); + menuBar->Append(menuBase, "&Database"); SetMenuBar(menuBar); // Create the wxNotebook widget @@ -145,7 +152,7 @@ void MainWindow::OnMenuNewGame(wxCommandEvent &event) { } void MainWindow::OnNewGame(wxCommandEvent &event) { - Game *g=(Game*)event.GetClientData(); + Game *g = (Game *)event.GetClientData(); NewGame(g); } |
