[389] | 1 | /////////////////////////////////////////////////////////////////////////////
|
---|
[411] | 2 | // Name: about_window.cpp
|
---|
[389] | 3 | // Purpose:
|
---|
| 4 | // Author:
|
---|
| 5 | // Modified by:
|
---|
| 6 | // Created: 08/05/2009 11:10:32
|
---|
| 7 | // RCS-ID:
|
---|
| 8 | // Copyright:
|
---|
| 9 | // Licence:
|
---|
| 10 | /////////////////////////////////////////////////////////////////////////////
|
---|
| 11 |
|
---|
| 12 | // For compilers that support precompilation, includes "wx/wx.h".
|
---|
| 13 | #include "wx/wxprec.h"
|
---|
| 14 |
|
---|
| 15 | #ifdef __BORLANDC__
|
---|
| 16 | #pragma hdrstop
|
---|
| 17 | #endif
|
---|
| 18 |
|
---|
| 19 | #ifndef WX_PRECOMP
|
---|
| 20 | #include "wx/wx.h"
|
---|
| 21 | #endif
|
---|
| 22 |
|
---|
| 23 | ////@begin includes
|
---|
| 24 | ////@end includes
|
---|
| 25 |
|
---|
[412] | 26 | #include "about.h"
|
---|
[389] | 27 |
|
---|
| 28 | ////@begin XPM images
|
---|
| 29 | ////@end XPM images
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | /*
|
---|
| 33 | * About type definition
|
---|
| 34 | */
|
---|
| 35 |
|
---|
| 36 | IMPLEMENT_DYNAMIC_CLASS( About, wxDialog )
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 | /*
|
---|
| 40 | * About event table definition
|
---|
| 41 | */
|
---|
| 42 |
|
---|
| 43 | BEGIN_EVENT_TABLE( About, wxDialog )
|
---|
| 44 |
|
---|
| 45 | ////@begin About event table entries
|
---|
| 46 | ////@end About event table entries
|
---|
| 47 |
|
---|
| 48 | END_EVENT_TABLE()
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 | /*
|
---|
| 52 | * About constructors
|
---|
| 53 | */
|
---|
| 54 |
|
---|
| 55 | About::About()
|
---|
| 56 | {
|
---|
| 57 | Init();
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | About::About( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
---|
| 61 | {
|
---|
| 62 | Init();
|
---|
| 63 | Create(parent, id, caption, pos, size, style);
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | /*
|
---|
| 68 | * About creator
|
---|
| 69 | */
|
---|
| 70 |
|
---|
| 71 | bool About::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
---|
| 72 | {
|
---|
[411] | 73 | ////@begin About creation
|
---|
[389] | 74 | SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
|
---|
| 75 | wxDialog::Create( parent, id, caption, pos, size, style );
|
---|
[411] | 76 |
|
---|
[389] | 77 | CreateControls();
|
---|
| 78 | if (GetSizer())
|
---|
| 79 | {
|
---|
| 80 | GetSizer()->SetSizeHints(this);
|
---|
| 81 | }
|
---|
| 82 | Centre();
|
---|
[411] | 83 | ////@end About creation
|
---|
[389] | 84 | return true;
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 | /*
|
---|
| 89 | * About destructor
|
---|
| 90 | */
|
---|
| 91 |
|
---|
| 92 | About::~About()
|
---|
| 93 | {
|
---|
[411] | 94 | ////@begin About destruction
|
---|
| 95 | ////@end About destruction
|
---|
[389] | 96 | }
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | /*
|
---|
| 100 | * Member initialisation
|
---|
| 101 | */
|
---|
| 102 |
|
---|
| 103 | void About::Init()
|
---|
| 104 | {
|
---|
[411] | 105 | ////@begin About member initialisation
|
---|
| 106 | ////@end About member initialisation
|
---|
[389] | 107 | }
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 | /*
|
---|
| 111 | * Control creation for About
|
---|
| 112 | */
|
---|
| 113 |
|
---|
| 114 | void About::CreateControls()
|
---|
| 115 | {
|
---|
[411] | 116 | ////@begin About content construction
|
---|
[389] | 117 | About* itemDialog1 = this;
|
---|
[411] | 118 |
|
---|
[389] | 119 | wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
---|
| 120 | itemDialog1->SetSizer(itemBoxSizer2);
|
---|
[411] | 121 |
|
---|
[389] | 122 | wxPanel* itemPanel3 = new wxPanel( itemDialog1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
|
---|
| 123 | itemBoxSizer2->Add(itemPanel3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
[411] | 124 |
|
---|
[389] | 125 | wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
|
---|
| 126 | itemPanel3->SetSizer(itemBoxSizer4);
|
---|
[411] | 127 |
|
---|
[412] | 128 | wxStaticText* itemStaticText5 = new wxStaticText( itemPanel3, wxID_STATIC, _("Mod Installer v1.0\nby Gumby and Iritscen\n\nAE credited to:\nEdT: BGI troops, additional weapons\ngeyser: Original creator\nGumby: Installer and Framework\nIritscen: Installer (Mac)\nLoser: Improved animation and AI\nNeo: OniSplit, documenting Oni, tech support\nONIrules: Additional weapons\nParadox: Documenting of Oni\nRossyMiles: Daodan DLL port to C\nSFeLi: Original Daodan DLL\nssg: Documenting Oni"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER );
|
---|
[389] | 129 | itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL, 5);
|
---|
[411] | 130 |
|
---|
[389] | 131 | wxStaticLine* itemStaticLine6 = new wxStaticLine( itemPanel3, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
---|
| 132 | itemBoxSizer4->Add(itemStaticLine6, 0, wxGROW|wxALL, 5);
|
---|
[411] | 133 |
|
---|
| 134 | wxTextCtrl* itemTextCtrl7 = new wxTextCtrl( itemPanel3, wxID_STATIC, _("oni.bungie.org"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
---|
| 135 | itemBoxSizer4->Add(itemTextCtrl7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
| 136 |
|
---|
[389] | 137 | wxStdDialogButtonSizer* itemStdDialogButtonSizer8 = new wxStdDialogButtonSizer;
|
---|
[411] | 138 |
|
---|
[389] | 139 | itemBoxSizer4->Add(itemStdDialogButtonSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
---|
| 140 | wxButton* itemButton9 = new wxButton( itemPanel3, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
---|
| 141 | itemStdDialogButtonSizer8->AddButton(itemButton9);
|
---|
[411] | 142 |
|
---|
[389] | 143 | itemStdDialogButtonSizer8->Realize();
|
---|
[411] | 144 |
|
---|
| 145 | ////@end About content construction
|
---|
[389] | 146 | }
|
---|
| 147 |
|
---|
| 148 |
|
---|
| 149 | /*
|
---|
| 150 | * Should we show tooltips?
|
---|
| 151 | */
|
---|
| 152 |
|
---|
| 153 | bool About::ShowToolTips()
|
---|
| 154 | {
|
---|
| 155 | return true;
|
---|
| 156 | }
|
---|
| 157 |
|
---|
| 158 | /*
|
---|
| 159 | * Get bitmap resources
|
---|
| 160 | */
|
---|
| 161 |
|
---|
| 162 | wxBitmap About::GetBitmapResource( const wxString& name )
|
---|
| 163 | {
|
---|
| 164 | // Bitmap retrieval
|
---|
[411] | 165 | ////@begin About bitmap retrieval
|
---|
[389] | 166 | wxUnusedVar(name);
|
---|
| 167 | return wxNullBitmap;
|
---|
[411] | 168 | ////@end About bitmap retrieval
|
---|
[389] | 169 | }
|
---|
| 170 |
|
---|
| 171 | /*
|
---|
| 172 | * Get icon resources
|
---|
| 173 | */
|
---|
| 174 |
|
---|
| 175 | wxIcon About::GetIconResource( const wxString& name )
|
---|
| 176 | {
|
---|
| 177 | // Icon retrieval
|
---|
[411] | 178 | ////@begin About icon retrieval
|
---|
[389] | 179 | wxUnusedVar(name);
|
---|
| 180 | return wxNullIcon;
|
---|
[411] | 181 | ////@end About icon retrieval
|
---|
[389] | 182 | }
|
---|