mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-05-03 10:17:46 +00:00
Update BaseTab implementation
This commit is contained in:
parent
bdfc577a3b
commit
32a0b3e31f
7 changed files with 56 additions and 12 deletions
src/base_tab
|
@ -0,0 +1,24 @@
|
|||
#include "BaseTab.hpp"
|
||||
#include <wx/filename.h>
|
||||
|
||||
BaseTab::BaseTab(wxFrame *parent)
|
||||
: BasePanelBF(parent), TabInfos(TabInfos::BASE), base(NULL) {
|
||||
LoadFile("/home/loic/text.PGn");
|
||||
}
|
||||
|
||||
void BaseTab::ApplyPreferences() {}
|
||||
|
||||
void BaseTab::LoadFile(std::string path) {
|
||||
wxFileName file(path);
|
||||
wxString ext = file.GetExt().Lower();
|
||||
if (ext == "pgn") {
|
||||
base = new PGNGameBase(path);
|
||||
}
|
||||
|
||||
if (base != NULL) {
|
||||
while(base->HasNextGame()){
|
||||
Game *g=base->GetNextGame();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue