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
5a4ec5d1e8
commit
8a9b920a5e
4 changed files with 4 additions and 1 deletions
|
@ -109,6 +109,7 @@ void BaseGameTab::Reset(std::shared_ptr<GameBase> base){
|
||||||
deleted.clear();
|
deleted.clear();
|
||||||
|
|
||||||
// Load all games (for now :)
|
// Load all games (for now :)
|
||||||
|
SHOW_DIALOG_BUSY("Loading database...");
|
||||||
this->base=base;
|
this->base=base;
|
||||||
if (base != NULL) {
|
if (base != NULL) {
|
||||||
while (base->NextGame()) {
|
while (base->NextGame()) {
|
||||||
|
|
|
@ -79,6 +79,7 @@ void BaseImportTab::OnLoad(wxCommandEvent &event){
|
||||||
|
|
||||||
// Load all games (for now :)
|
// Load all games (for now :)
|
||||||
selected_base->Reset();
|
selected_base->Reset();
|
||||||
|
SHOW_DIALOG_BUSY("Loading database...");
|
||||||
while (selected_base->NextGame()) {
|
while (selected_base->NextGame()) {
|
||||||
glm->AddGame(
|
glm->AddGame(
|
||||||
selected_base->GetTag("White"),
|
selected_base->GetTag("White"),
|
||||||
|
|
|
@ -25,7 +25,6 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file)
|
||||||
// Bindings
|
// Bindings
|
||||||
this->Bind(OPEN_GAME_EVENT, &BaseTab::OnOpenGame, this, wxID_ANY);
|
this->Bind(OPEN_GAME_EVENT, &BaseTab::OnOpenGame, this, wxID_ANY);
|
||||||
this->Bind(wxEVT_BUTTON, &BaseTab::OnSave, this, ID_SAVE_BUTTON);
|
this->Bind(wxEVT_BUTTON, &BaseTab::OnSave, this, ID_SAVE_BUTTON);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <wx/config.h>
|
#include <wx/config.h>
|
||||||
#include <wx/filefn.h> // Check file exists etc
|
#include <wx/filefn.h> // Check file exists etc
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
#include <wx/busyinfo.h>
|
||||||
|
|
||||||
#define MAINWIN ((MainWindow *)wxGetApp().GetTopWindow())
|
#define MAINWIN ((MainWindow *)wxGetApp().GetTopWindow())
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
dial->ShowModal(); \
|
dial->ShowModal(); \
|
||||||
}
|
}
|
||||||
#define SHOW_DIALOG_INFO(message) {wxMessageBox( wxT(message) );}
|
#define SHOW_DIALOG_INFO(message) {wxMessageBox( wxT(message) );}
|
||||||
|
#define SHOW_DIALOG_BUSY(message) {wxBusyInfo wait(message);}
|
||||||
#define REQUIRE_FILE(file) \
|
#define REQUIRE_FILE(file) \
|
||||||
{ \
|
{ \
|
||||||
if (!wxFileExists(file)) { \
|
if (!wxFileExists(file)) { \
|
||||||
|
|
Loading…
Add table
Reference in a new issue