source: trunk/OpenYahtzee/src/About.cpp @ 76

Last change on this file since 76 was 76, checked in by guyru, 6 years ago

updated about info and added url settings

File size: 6.0 KB
Line 
1// $Header: $
2/***************************************************************************
3 *   Copyright (C) 2006 by Guy Rutenberg   *
4 *   guyrutenberg@gmail.com   *
5 *                                                                         *
6 *   This program is free software; you can redistribute it and/or modify  *
7 *   it under the terms of the GNU General Public License as published by  *
8 *   the Free Software Foundation; either version 2 of the License, or     *
9 *   (at your option) any later version.                                   *
10 *                                                                         *
11 *   This program is distributed in the hope that it will be useful,       *
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14 *   GNU General Public License for more details.                          *
15 *                                                                         *
16 *   You should have received a copy of the GNU General Public License     *
17 *   along with this program; if not, write to the                         *
18 *   Free Software Foundation, Inc.,                                       *
19 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20 ***************************************************************************/
21// -*- C++ -*- generated by wxGlade 0.4.1cvs on Tue Feb 27 17:58:29 2007 from /home/guy/about.wgt
22
23#include "About.h"
24
25
26AboutDialog::AboutDialog(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
27    wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxMINIMIZE_BOX)
28{
29        wxString temp= wxT(DATADIR);
30        temp += wxT("/OpenYahtzee/logo.gif");
31
32        wxBitmap *logo = new wxBitmap(temp, wxBITMAP_TYPE_GIF);
33
34        //scale logo
35        wxImage tempimage = logo->ConvertToImage();
36        *logo = wxBitmap(tempimage.Scale(219,64));
37       
38        notebook_main = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, 0);
39       
40        notebook_main_pane_license = new wxScrolledWindow(notebook_main, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
41       
42        notebook_main_pane_thanks = new wxScrolledWindow(notebook_main, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
43       
44        notebook_main_pane_authors = new wxScrolledWindow(notebook_main, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
45       
46        notebook_main_pane_about = new wxPanel(notebook_main, -1);
47       
48        bitmap_1 = new wxDynamicBitmap((wxWindow*)this, (wxWindowID)wxID_ANY,*logo);
49       
50        app_label = new wxStaticText(this, -1, wxT("Open Yahtzee 1.8.0"));
51        label_desc = new wxStaticText(notebook_main_pane_about, -1, wxT("A full-featured wxWidgets version of\nthe classic dice game Yahtzee."));
52        label_copyright = new wxStaticText(notebook_main_pane_about, -1, wxT("(c) 2006-2007 Guy Rutenberg"));
53        label_1 = new wxStaticText(notebook_main_pane_about, -1, wxT("http://openyahtzee.sourceforge.net/"));
54        label_7 = new wxStaticText(notebook_main_pane_authors, -1, wxT("Please report bugs to openyahtzee-users@lists.sourceforge.net.\n\nGuy Rutenberg\n\tguyrutenberg@gmail.com\n\tAuthor, maintainer"));
55        label_6 = new wxStaticText(notebook_main_pane_thanks, -1, wxT("Seamous McGill\n\tjohndoe@gmail.com\n\tLogo and dice design\n\nNeil Gierman\n\tngierman@roadrunn.com\n\tRPM packages"));
56    label_15 = new wxStaticText(notebook_main_pane_license, -1, wxT("This program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by \nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of \nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details. \n\nYou should have received a copy of the GNU General Public License \nalong with this program; if not, write to the\nFree Software Foundation, Inc.,\n59 Temple Place - Suite 330, Boston, MA  02111-1307, USA."));
57    close_button = new wxButton(this, wxID_OK, wxT("Close"));
58
59        set_properties();
60        do_layout();
61}
62
63
64void AboutDialog::set_properties()
65{
66        SetSize(wxSize(600, 300));
67        app_label->SetFont(wxFont(14, wxDEFAULT, wxNORMAL, wxBOLD, 0, wxT("")));
68        notebook_main_pane_authors->SetScrollRate(10, 10);
69        notebook_main_pane_thanks->SetScrollRate(10, 10);
70        notebook_main_pane_license->SetScrollRate(10, 10);
71}
72
73
74void AboutDialog::do_layout()
75{
76    // begin wxGlade: AboutDialog::do_layout
77    wxBoxSizer* sizer_1 = new wxBoxSizer(wxVERTICAL);
78    wxBoxSizer* sizer_6 = new wxBoxSizer(wxVERTICAL);
79    wxBoxSizer* sizer_5 = new wxBoxSizer(wxHORIZONTAL);
80    wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL);
81    wxBoxSizer* sizer_3 = new wxBoxSizer(wxVERTICAL);
82    wxBoxSizer* sizer_2 = new wxBoxSizer(wxHORIZONTAL);
83    sizer_2->Add(bitmap_1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10);
84    sizer_2->Add(app_label, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 10);
85    sizer_1->Add(sizer_2, 0, 0, 0);
86    sizer_3->Add(label_desc, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
87    sizer_3->Add(label_copyright, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
88    sizer_3->Add(label_1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
89    notebook_main_pane_about->SetSizer(sizer_3);
90    sizer_4->Add(label_7, 0, wxALL, 10);
91    notebook_main_pane_authors->SetSizer(sizer_4);
92    sizer_5->Add(label_6, 0, wxALL, 10);
93    notebook_main_pane_thanks->SetSizer(sizer_5);
94    sizer_6->Add(label_15, 0, wxADJUST_MINSIZE, 0);
95    notebook_main_pane_license->SetSizer(sizer_6);
96    notebook_main->AddPage(notebook_main_pane_about, wxT("About"));
97    notebook_main->AddPage(notebook_main_pane_authors, wxT("Authors"));
98    notebook_main->AddPage(notebook_main_pane_thanks, wxT("Thanks To"));
99    notebook_main->AddPage(notebook_main_pane_license, wxT("License Agreement"));
100    sizer_1->Add(notebook_main, 1, wxEXPAND, 0);
101    sizer_1->Add(close_button, 0, wxALL|wxALIGN_RIGHT, 10);
102    SetSizer(sizer_1);
103    Layout();
104    // end wxGlade
105}
106
Note: See TracBrowser for help on using the repository browser.