mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-05-01 09:17:46 +00:00
Update GUI
This commit is contained in:
parent
9b2ebc19a6
commit
416ab7635d
4 changed files with 25 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue