Prepare API for adding games to database

This commit is contained in:
Loic Guegan 2022-02-25 15:29:04 +01:00
parent 98488e899a
commit 3b6e7d39cf
3 changed files with 8 additions and 3 deletions

View file

@ -11,7 +11,7 @@ wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
class BaseTab : public BasePanelBF, public TabInfos { class BaseTab : public BasePanelBF, public TabInfos {
GameBase *base; GameBase *base;
std::vector<std::uint32_t> deleted; std::vector<std::uint32_t> deleted;
std::vector<Game*> edited; std::vector<Game *> edited;
std::string base_file; std::string base_file;
public: public:
@ -22,4 +22,6 @@ public:
void OnSave(wxCommandEvent &event); void OnSave(wxCommandEvent &event);
void OnExport(wxCommandEvent &event); void OnExport(wxCommandEvent &event);
void OnOpenGame(wxListEvent &event); void OnOpenGame(wxListEvent &event);
void *GetGame() { return (NULL); }
void *GetBase() { return (base); };
}; };

View file

@ -13,7 +13,6 @@
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent); wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent); wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
class GameTab : public wxPanel, public TabInfos { class GameTab : public wxPanel, public TabInfos {
EditorPanel *editor_panel; EditorPanel *editor_panel;
BoardPanel *board_panel; BoardPanel *board_panel;
@ -21,8 +20,10 @@ class GameTab : public wxPanel, public TabInfos {
void RefreshLabel(); void RefreshLabel();
void OnRefreshTabTitle(wxCommandEvent &event); void OnRefreshTabTitle(wxCommandEvent &event);
void OnGameChange(wxCommandEvent &event); void OnGameChange(wxCommandEvent &event);
public: public:
GameTab(wxFrame *parent, Game *game); GameTab(wxFrame *parent, Game *game);
void ApplyPreferences(); void ApplyPreferences();
void *GetGame() { return (game); }
void *GetBase() { return (NULL); };
}; };

View file

@ -54,4 +54,6 @@ public:
Type type; Type type;
TabInfos(Type type_) : type(type_) {} TabInfos(Type type_) : type(type_) {}
virtual void ApplyPreferences() = 0; virtual void ApplyPreferences() = 0;
virtual void *GetGame() = 0;
virtual void *GetBase() = 0;
}; };