aboutsummaryrefslogtreecommitdiff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 3a67975..c11e25b 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -43,6 +43,8 @@ MainWindow::MainWindow()
wxCommandEvent dummy(REFRESH_ENGINE_LIST, GetId());
OnRefreshEngineList(dummy);
+ menu_help->Append(8, "About", "OChess Informations");
+
Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, &MainWindow::OnPageChange, this,
wxID_ANY);
Bind(REFRESH_TAB_TITLE, &MainWindow::OnRefreshTabTitle, this, wxID_ANY);
@@ -171,6 +173,8 @@ void MainWindow::OnMenuItemClick(wxCommandEvent &event) {
}
} else if (id == 7) { // Create new engine
NewEngine();
+ } else if (id == 8) { // Create new engine
+ ShowAbout();
}
}
@@ -278,3 +282,52 @@ TabInfos* MainWindow::NewGame(std::shared_ptr<Game> game) {
this->AddPage(gt,gt);
return(gt);
}
+
+void MainWindow::ShowAbout(){
+ DialogAbout *dialog=new DialogAbout(this);
+ wxRichTextCtrl *t=dialog->info_richtext;
+
+ // Populate info:
+ wxFont font(wxFontInfo(12));
+ t->SetFont(font);
+ t->BeginAlignment(wxTEXT_ALIGNMENT_CENTRE);
+ t->BeginBold();
+ t->BeginFontSize(20);
+ t->WriteText(wxT("OChess"));
+ t->EndFontSize();
+ t->Newline();
+ t->EndBold();
+ t->WriteText(wxT("An open source software for chess games analysis and database management."));
+ t->Newline();
+ t->Newline();
+ t->BeginFontSize(8);
+ t->WriteText(wxT("OChess version "+std::string(OCHESS_VERSION)));
+ t->Newline();
+ t->WriteText(wxT("OChess is delivered under GPLv3 license"));
+ t->Newline();
+ t->WriteText(wxT("Built on "+std::string(BUILD_TIME)));
+ t->EndFontSize();
+ t->Newline();
+ t->Newline();
+ t->WriteText("Repository:");
+ t->Newline();
+ t->BeginURL("https://gitlab.com/manzerbredes/ochess");
+ t->BeginUnderline();
+ t->WriteText(wxT("https://gitlab.com/manzerbredes/ochess"));
+ t->EndUnderline();
+ t->EndURL();
+ t->Newline();
+ t->Newline();
+ t->BeginFontSize(10);
+ t->WriteText("For any questions/discussion please join the IRC chat at ");
+ t->BeginURL("irc://irc.libera.chat/ochess");
+ t->BeginUnderline();
+ t->WriteText(wxT("irc://irc.libera.chat/ochess"));
+ t->EndUnderline();
+ t->EndURL();
+ t->EndFontSize();
+ t->Newline();
+ t->EndAlignment();
+
+ dialog->Show();
+} \ No newline at end of file