aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/MainWindow.cpp17
-rw-r--r--src/gui.cpp26
-rw-r--r--src/gui.h7
3 files changed, 42 insertions, 8 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 00e375d..55f35f5 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -287,11 +287,13 @@ TabInfos* MainWindow::NewGame(std::shared_ptr<Game> game) {
void MainWindow::ShowAbout(){
DialogAbout *dialog=new DialogAbout(this);
- dialog->ochess_icon->SetBitmap(LoadPNG("ochess",wxSize(80,80)));
+ wxFont font(wxFontInfo(12));
+ dialog->app_icon->SetBitmap(LoadPNG("ochess",wxSize(80,80)));
+ dialog->appname_text->SetFont(wxFont(wxFontInfo(18).Bold()));
+ dialog->appname_text->SetLabel(wxT("OChess v"+std::string(OCHESS_VERSION)));
// Populate info:
wxRichTextCtrl *t=dialog->info_richtext;
- wxFont font(wxFontInfo(12));
t->SetFont(font);
t->BeginAlignment(wxTEXT_ALIGNMENT_CENTRE);
t->BeginBold();
@@ -304,8 +306,6 @@ void MainWindow::ShowAbout(){
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)));
@@ -332,5 +332,14 @@ void MainWindow::ShowAbout(){
t->Newline();
t->EndAlignment();
+ // Populate credits:
+ wxRichTextCtrl *c=dialog->credits_richtext;
+ c->SetFont(font);
+ c->BeginBold();
+ c->WriteText("Developers:");
+ c->EndBold();
+ c->Newline();
+ c->WriteText(" - manzerbredes <manzerbredes@mailbox.org>");
+
dialog->Show();
} \ No newline at end of file
diff --git a/src/gui.cpp b/src/gui.cpp
index df02581..d1fcda1 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -57,8 +57,18 @@ DialogAbout::DialogAbout( wxWindow* parent, wxWindowID id, const wxString& title
wxBoxSizer* main_sizer;
main_sizer = new wxBoxSizer( wxVERTICAL );
- ochess_icon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- main_sizer->Add( ochess_icon, 0, wxALL, 5 );
+ wxBoxSizer* top_sizer;
+ top_sizer = new wxBoxSizer( wxHORIZONTAL );
+
+ app_icon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ top_sizer->Add( app_icon, 0, wxALL, 5 );
+
+ appname_text = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
+ appname_text->Wrap( -1 );
+ top_sizer->Add( appname_text, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ main_sizer->Add( top_sizer, 0, wxEXPAND, 5 );
m_notebook3 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
info_panel = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
@@ -73,6 +83,18 @@ DialogAbout::DialogAbout( wxWindow* parent, wxWindowID id, const wxString& title
info_panel->Layout();
info_sizer->Fit( info_panel );
m_notebook3->AddPage( info_panel, wxT("Info"), false );
+ credits_panel = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* credits_sizer;
+ credits_sizer = new wxBoxSizer( wxVERTICAL );
+
+ credits_richtext = new wxRichTextCtrl( credits_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
+ credits_sizer->Add( credits_richtext, 1, wxEXPAND | wxALL, 5 );
+
+
+ credits_panel->SetSizer( credits_sizer );
+ credits_panel->Layout();
+ credits_sizer->Fit( credits_panel );
+ m_notebook3->AddPage( credits_panel, wxT("Credits"), false );
main_sizer->Add( m_notebook3, 1, wxEXPAND | wxALL, 5 );
diff --git a/src/gui.h b/src/gui.h
index 4d197c5..54477ca 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -23,11 +23,11 @@
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
+#include <wx/stattext.h>
#include <wx/richtext/richtextctrl.h>
#include <wx/panel.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
-#include <wx/stattext.h>
#include <wx/button.h>
#include <wx/spinctrl.h>
#include <wx/listctrl.h>
@@ -104,10 +104,13 @@ class DialogAbout : public wxDialog
protected:
wxNotebook* m_notebook3;
wxPanel* info_panel;
+ wxPanel* credits_panel;
public:
- wxStaticBitmap* ochess_icon;
+ wxStaticBitmap* app_icon;
+ wxStaticText* appname_text;
wxRichTextCtrl* info_richtext;
+ wxRichTextCtrl* credits_richtext;
DialogAbout( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_DIALOG_STYLE );