[487] | 1 | /***************************************************************************\
|
---|
| 2 | | Project: AE Installer |
|
---|
| 3 | | By: Gumby & Iritscen |
|
---|
| 4 | | File: About.cpp |
|
---|
| 5 | | Function: Handles the About window! |
|
---|
| 6 | | Created: 08/05/2009 11:10:32 |
|
---|
| 7 | \***************************************************************************/
|
---|
[389] | 8 |
|
---|
| 9 | ////@begin includes
|
---|
| 10 | ////@end includes
|
---|
[487] | 11 | #include "globals.h"
|
---|
[412] | 12 | #include "about.h"
|
---|
[389] | 13 |
|
---|
| 14 | ////@begin XPM images
|
---|
| 15 | ////@end XPM images
|
---|
| 16 |
|
---|
| 17 | /*
|
---|
| 18 | * About type definition
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 | IMPLEMENT_DYNAMIC_CLASS( About, wxDialog )
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | /*
|
---|
| 25 | * About event table definition
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 | BEGIN_EVENT_TABLE( About, wxDialog )
|
---|
| 29 |
|
---|
| 30 | ////@begin About event table entries
|
---|
| 31 | ////@end About event table entries
|
---|
| 32 |
|
---|
| 33 | END_EVENT_TABLE()
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | /*
|
---|
| 37 | * About constructors
|
---|
| 38 | */
|
---|
| 39 |
|
---|
| 40 | About::About()
|
---|
| 41 | {
|
---|
| 42 | Init();
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | About::About( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
---|
| 46 | {
|
---|
| 47 | Init();
|
---|
| 48 | Create(parent, id, caption, pos, size, style);
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | /*
|
---|
| 53 | * About creator
|
---|
| 54 | */
|
---|
| 55 |
|
---|
| 56 | bool About::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
---|
| 57 | {
|
---|
[411] | 58 | ////@begin About creation
|
---|
[389] | 59 | SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
|
---|
| 60 | wxDialog::Create( parent, id, caption, pos, size, style );
|
---|
[411] | 61 |
|
---|
[389] | 62 | CreateControls();
|
---|
| 63 | if (GetSizer())
|
---|
| 64 | {
|
---|
| 65 | GetSizer()->SetSizeHints(this);
|
---|
| 66 | }
|
---|
| 67 | Centre();
|
---|
[411] | 68 | ////@end About creation
|
---|
[389] | 69 | return true;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 |
|
---|
| 73 | /*
|
---|
| 74 | * About destructor
|
---|
| 75 | */
|
---|
| 76 |
|
---|
| 77 | About::~About()
|
---|
| 78 | {
|
---|
[411] | 79 | ////@begin About destruction
|
---|
| 80 | ////@end About destruction
|
---|
[389] | 81 | }
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | /*
|
---|
| 85 | * Member initialisation
|
---|
| 86 | */
|
---|
| 87 |
|
---|
| 88 | void About::Init()
|
---|
| 89 | {
|
---|
[411] | 90 | ////@begin About member initialisation
|
---|
| 91 | ////@end About member initialisation
|
---|
[389] | 92 | }
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 | /*
|
---|
| 96 | * Control creation for About
|
---|
| 97 | */
|
---|
| 98 |
|
---|
| 99 | void About::CreateControls()
|
---|
| 100 | {
|
---|
[411] | 101 | ////@begin About content construction
|
---|
[389] | 102 | About* itemDialog1 = this;
|
---|
[411] | 103 |
|
---|
[389] | 104 | wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
---|
| 105 | itemDialog1->SetSizer(itemBoxSizer2);
|
---|
[411] | 106 |
|
---|
[512] | 107 | wxPanel* itemPanel3 = new wxPanel( itemDialog1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
|
---|
[389] | 108 | itemBoxSizer2->Add(itemPanel3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
[411] | 109 |
|
---|
[389] | 110 | wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
|
---|
| 111 | itemPanel3->SetSizer(itemBoxSizer4);
|
---|
[411] | 112 |
|
---|
[542] | 113 | string aboutText = "AE Installer v";
|
---|
[565] | 114 | aboutText = aboutText + gInstallerVersion;
|
---|
[487] | 115 | aboutText = aboutText + "\nby Gumby and Iritscen\n\n" +
|
---|
[542] | 116 | "AE Credits:\n" +
|
---|
| 117 | "demos_kratos: OniSplit GUI (Windows)\n" +
|
---|
| 118 | "EdT: OniSplit GUI (Mac)\n" +
|
---|
| 119 | "geyser: Original creator of the Edition\n" +
|
---|
| 120 | "Gumby: Installer (Win), AE Framework\n" +
|
---|
| 121 | "Iritscen: Installer (Mac)\n" +
|
---|
| 122 | "Loser: Documenting Oni's game data\n" +
|
---|
[487] | 123 | "Neo: OniSplit, documenting Oni, tech support\n" +
|
---|
[542] | 124 | "Paradox: Documenting Oni's game data\n" +
|
---|
[487] | 125 | "RossyMiles: Daodan DLL port to C\n" +
|
---|
[542] | 126 | "SFeLi: Original Daodan DLL\n" +
|
---|
[487] | 127 | "ssg: Documenting Oni's game data";
|
---|
| 128 | wxStaticText* itemStaticText5 = new wxStaticText( itemPanel3, wxID_STATIC, _(aboutText.c_str()), wxDefaultPosition, wxDefaultSize, wxNO_BORDER );
|
---|
[548] | 129 |
|
---|
[389] | 130 | itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL, 5);
|
---|
[411] | 131 |
|
---|
[389] | 132 | wxStaticLine* itemStaticLine6 = new wxStaticLine( itemPanel3, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
---|
| 133 | itemBoxSizer4->Add(itemStaticLine6, 0, wxGROW|wxALL, 5);
|
---|
[411] | 134 |
|
---|
[512] | 135 | wxHyperlinkCtrl* oniUrl = new wxHyperlinkCtrl( itemPanel3, wxID_STATIC, "http://oni.bungie.org", "http://oni.bungie.org",
|
---|
| 136 | wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
---|
| 137 | itemBoxSizer4->Add(oniUrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
[411] | 138 |
|
---|
[389] | 139 | wxStdDialogButtonSizer* itemStdDialogButtonSizer8 = new wxStdDialogButtonSizer;
|
---|
[411] | 140 |
|
---|
[389] | 141 | itemBoxSizer4->Add(itemStdDialogButtonSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
| 142 | wxButton* itemButton9 = new wxButton( itemPanel3, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
---|
| 143 | itemStdDialogButtonSizer8->AddButton(itemButton9);
|
---|
[411] | 144 |
|
---|
[389] | 145 | itemStdDialogButtonSizer8->Realize();
|
---|
[411] | 146 |
|
---|
| 147 | ////@end About content construction
|
---|
[389] | 148 | }
|
---|
| 149 |
|
---|
| 150 |
|
---|
| 151 | /*
|
---|
| 152 | * Should we show tooltips?
|
---|
| 153 | */
|
---|
| 154 |
|
---|
| 155 | bool About::ShowToolTips()
|
---|
| 156 | {
|
---|
| 157 | return true;
|
---|
| 158 | }
|
---|
| 159 |
|
---|
| 160 | /*
|
---|
| 161 | * Get bitmap resources
|
---|
| 162 | */
|
---|
| 163 |
|
---|
| 164 | wxBitmap About::GetBitmapResource( const wxString& name )
|
---|
| 165 | {
|
---|
| 166 | // Bitmap retrieval
|
---|
[411] | 167 | ////@begin About bitmap retrieval
|
---|
[389] | 168 | wxUnusedVar(name);
|
---|
| 169 | return wxNullBitmap;
|
---|
[411] | 170 | ////@end About bitmap retrieval
|
---|
[389] | 171 | }
|
---|
| 172 |
|
---|
| 173 | /*
|
---|
| 174 | * Get icon resources
|
---|
| 175 | */
|
---|
| 176 |
|
---|
| 177 | wxIcon About::GetIconResource( const wxString& name )
|
---|
| 178 | {
|
---|
| 179 | // Icon retrieval
|
---|
[411] | 180 | ////@begin About icon retrieval
|
---|
[389] | 181 | wxUnusedVar(name);
|
---|
| 182 | return wxNullIcon;
|
---|
[411] | 183 | ////@end About icon retrieval
|
---|
[389] | 184 | }
|
---|