mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Improve UI
This commit is contained in:
parent
a762ff6521
commit
fc9f6bd6a2
4 changed files with 11 additions and 0 deletions
|
@ -60,6 +60,8 @@ void GameTab::OnToolClick(wxCommandEvent &event){
|
||||||
related_file = newFileDialog.GetPath().ToStdString();
|
related_file = newFileDialog.GetPath().ToStdString();
|
||||||
}
|
}
|
||||||
SaveGame(related_file,game);
|
SaveGame(related_file,game);
|
||||||
|
} else if(id==1){
|
||||||
|
wxLogDebug("Not yet implemented");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ GameTabLeftPanel::GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game)
|
||||||
// Configure toolbal
|
// Configure toolbal
|
||||||
game_toolbar->AddTool(0, wxT("Save As"),
|
game_toolbar->AddTool(0, wxT("Save As"),
|
||||||
wxArtProvider::GetBitmap(wxART_FILE_SAVE, wxART_TOOLBAR));
|
wxArtProvider::GetBitmap(wxART_FILE_SAVE, wxART_TOOLBAR));
|
||||||
|
game_toolbar->AddTool(1, wxT("Duplicate Game"),
|
||||||
|
wxArtProvider::GetBitmap(wxART_COPY, wxART_TOOLBAR));
|
||||||
|
|
||||||
// Add board
|
// Add board
|
||||||
board_canvas = new BoardCanvas((wxFrame *)this);
|
board_canvas = new BoardCanvas((wxFrame *)this);
|
||||||
|
|
|
@ -25,6 +25,12 @@ void MyApp::NewGame(TabInfos *tabsrc,std::shared_ptr<Game> g){
|
||||||
i->Link(tabsrc); // Link opened game to tabsrc
|
i->Link(tabsrc); // Link opened game to tabsrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyApp::NewGame(std::shared_ptr<Game> g){
|
||||||
|
MainWindow *w=((MainWindow *)this->GetTopWindow());
|
||||||
|
w->NewGame(g);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxIMPLEMENT_APP(MyApp);
|
wxIMPLEMENT_APP(MyApp);
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ public:
|
||||||
virtual bool OnInit();
|
virtual bool OnInit();
|
||||||
std::vector<TabInfos *> ListTabInfos();
|
std::vector<TabInfos *> ListTabInfos();
|
||||||
void NewGame(TabInfos *tabsrc,std::shared_ptr<Game> g);
|
void NewGame(TabInfos *tabsrc,std::shared_ptr<Game> g);
|
||||||
|
void NewGame(std::shared_ptr<Game> g);
|
||||||
};
|
};
|
||||||
|
|
||||||
wxDECLARE_APP(MyApp);
|
wxDECLARE_APP(MyApp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue