| 1 |
+ |
#ifndef NTDDI_VERSION |
| 2 |
+ |
#define NTDDI_VERSION NTDDI_WIN7 |
| 3 |
+ |
#endif |
| 4 |
+ |
#ifdef WIN32 |
| 5 |
+ |
#include <windows.h> |
| 6 |
+ |
#include <shobjidl.h> |
| 7 |
+ |
HWND Handle; |
| 8 |
+ |
|
| 9 |
+ |
ITaskbarList *pTaskbarList; |
| 10 |
+ |
ITaskbarList3 *pTaskbarList3; |
| 11 |
+ |
#endif |
| 12 |
+ |
|
| 13 |
|
/* |
| 14 |
< |
AE/Mod Installer |
| 15 |
< |
by Gumby and Iritscen |
| 14 |
> |
AE/Mod Installer |
| 15 |
> |
by Gumby and Iritscen |
| 16 |
|
*/ |
| 17 |
|
|
| 18 |
|
// To-do: - Load credits from text resource file |
| 7 |
– |
// - Version number in credits should be universalized |
| 19 |
|
// - Institute lots of checks into file-handling |
| 20 |
|
// - Clear mod info fields when mod is de-selected |
| 21 |
|
|
| 42 |
|
#include <dirent.h> |
| 43 |
|
#endif |
| 44 |
|
|
| 45 |
< |
const string strInstallerVersion = "1.0"; |
| 45 |
> |
//const string strInstallerVersion = "1.0"; |
| 46 |
|
const bool SPLIT = 1; |
| 47 |
|
const bool NOT_SPLIT = 0; |
| 48 |
|
bool splitInstances = SPLIT; |
| 70 |
|
#include "boost/date_time/date_parsing.hpp" |
| 71 |
|
#include "boost/date_time/posix_time/posix_time.hpp" |
| 72 |
|
|
| 73 |
+ |
string escapePath(string input) { |
| 74 |
+ |
|
| 75 |
+ |
string output; |
| 76 |
+ |
string escape_me = "& ;()|<>\"'\\#*?$"; |
| 77 |
+ |
for(int i = 0; i < input.size(); i++) { |
| 78 |
+ |
for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\'; |
| 79 |
+ |
output += input[i]; |
| 80 |
+ |
} |
| 81 |
+ |
return output; |
| 82 |
+ |
} |
| 83 |
+ |
|
| 84 |
|
int globalizeData(void) |
| 85 |
|
{ |
| 86 |
|
busy = 1; |
| 171 |
|
|
| 172 |
|
if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats"); |
| 173 |
|
create_directory( "packages/VanillaDats" ); |
| 152 |
– |
|
| 174 |
|
create_directory( "packages/VanillaDats/level0_Final/" ); |
| 175 |
|
//blah blah finish this. |
| 176 |
|
//logfile << "packages/VanillaDats/level0_Final/ created"; |
| 283 |
|
if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename()); |
| 284 |
|
else remove(dir_itr->path()); |
| 285 |
|
} |
| 286 |
+ |
else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding |
| 287 |
+ |
cout <<dir_itr->path().filename() << "\n"; |
| 288 |
+ |
|
| 289 |
+ |
if(!exists( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final/" + dir_itr->filename())) rename(dir_itr->path(), "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final/" + dir_itr->filename()); |
| 290 |
+ |
else remove(dir_itr->path()); |
| 291 |
+ |
} |
| 292 |
|
if (exists(dir_itr->path())) { |
| 293 |
|
|
| 294 |
|
} |
| 295 |
|
else { |
| 296 |
< |
logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 296 |
> |
//logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 297 |
|
} |
| 298 |
|
} |
| 299 |
|
|
| 315 |
|
//printf(levels[i],"%d",levels[i]); |
| 316 |
|
//printf(Step_x_x,"Step %d/%d: reimporting level", parts_done + 1, 7 + 2 * num_levels); setStatusArea((string)Step_x_x + levels[i] + (string)"_Final.dat"); |
| 317 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni"); |
| 318 |
< |
system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 319 |
< |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.log").c_str()); |
| 318 |
> |
logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 319 |
> |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n'; |
| 320 |
> |
string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 321 |
> |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize2.log"); |
| 322 |
> |
system(sys_str.c_str() ); |
| 323 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 324 |
|
parts_done++; |
| 325 |
|
} |
| 355 |
|
*/ |
| 356 |
|
create_directory((path)"../GameDataFolder/IGMD"); |
| 357 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
| 358 |
< |
setProgressBar( 1000 ); |
| 358 |
> |
setProgressBar( 1000 ); |
| 359 |
> |
|
| 360 |
> |
// CIP:last of all, set up the edition folder as a playable Oni installation by placing the latest application (+ Daodan DLL on Windows) in edition/ |
| 361 |
> |
// or we could just include it in the zip in the proper place already. |
| 362 |
> |
|
| 363 |
> |
copy("../../persist.dat","../persist.dat"); |
| 364 |
> |
copy("../../keyconfig.txt","../keyconfig.txt"); |
| 365 |
> |
#ifndef WIN32 |
| 366 |
> |
/* On Mac only, set the current GDF to the AE GDF by writing to Oni's global preferences file (thankfully a standard OS X ".plist" XML file). |
| 367 |
> |
If there are no Oni prefs (only possible if Oni has not been run even once), then the above line will fail silently, no harm done, |
| 368 |
> |
and when the user does run Oni for the first time, using the copy of the app in the AE GDF, Oni will set the prefs to use that GDF at that point */ |
| 369 |
> |
string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for Installer |
| 370 |
> |
char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '"; |
| 371 |
> |
strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) |
| 372 |
> |
strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters |
| 373 |
> |
system(prefsCommand); |
| 374 |
> |
|
| 375 |
> |
#endif |
| 376 |
> |
|
| 377 |
> |
|
| 378 |
|
setStatusArea((string)"Done! Now select your mod packages and click install."); |
| 379 |
|
// while(1) Sleep(-1); |
| 380 |
|
|
| 668 |
|
{ |
| 669 |
|
if ( is_directory( dir_itr->status() ) ) |
| 670 |
|
{ |
| 671 |
< |
importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename() |
| 623 |
< |
+ ".dat"; |
| 671 |
> |
importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " "; |
| 672 |
|
for (int i = 0; i < installedMods.size(); ++i) { |
| 673 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename() )) |
| 674 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename(); |
| 829 |
|
#endif |
| 830 |
|
|
| 831 |
|
////@begin includes |
| 832 |
< |
#include "about_window.h" |
| 832 |
> |
#include "about.h" |
| 833 |
|
////@end includes |
| 834 |
|
|
| 835 |
|
#include "main_window.h" |
| 836 |
|
|
| 837 |
|
////@begin XPM images |
| 838 |
< |
#include "redo.xpm" |
| 838 |
> |
#include "aelogosmall.xpm" |
| 839 |
> |
#include "undo.xpm" |
| 840 |
|
#include "fileopen.xpm" |
| 841 |
|
#include "filesaveas.xpm" |
| 842 |
|
#include "quit.xpm" |
| 859 |
|
BEGIN_EVENT_TABLE( MainWindow, wxFrame ) |
| 860 |
|
|
| 861 |
|
////@begin MainWindow event table entries |
| 862 |
< |
EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) |
| 862 |
> |
EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) |
| 863 |
|
|
| 864 |
< |
EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) |
| 864 |
> |
EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) |
| 865 |
|
|
| 866 |
< |
EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) |
| 867 |
< |
EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) |
| 866 |
> |
EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) |
| 867 |
> |
EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) |
| 868 |
|
|
| 869 |
< |
EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) |
| 869 |
> |
EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) |
| 870 |
|
|
| 871 |
< |
EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) |
| 871 |
> |
EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) |
| 872 |
|
|
| 873 |
< |
EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) |
| 873 |
> |
EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) |
| 874 |
|
|
| 875 |
< |
EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) |
| 875 |
> |
EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) |
| 876 |
|
|
| 877 |
< |
EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected ) |
| 877 |
> |
EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected ) |
| 878 |
|
|
| 879 |
< |
EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) |
| 879 |
> |
EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) |
| 880 |
|
|
| 881 |
< |
EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) |
| 881 |
> |
EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) |
| 882 |
|
|
| 883 |
< |
EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) |
| 883 |
> |
EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) |
| 884 |
|
|
| 885 |
< |
EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) |
| 885 |
> |
EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) |
| 886 |
|
|
| 887 |
< |
EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) |
| 887 |
> |
EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) |
| 888 |
|
|
| 889 |
< |
EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) |
| 889 |
> |
EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) |
| 890 |
|
|
| 891 |
< |
EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) |
| 891 |
> |
EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) |
| 892 |
|
|
| 893 |
|
////@end MainWindow event table entries |
| 894 |
|
|
| 918 |
|
bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) |
| 919 |
|
{ |
| 920 |
|
////@begin MainWindow creation |
| 921 |
< |
wxFrame::Create( parent, id, caption, pos, size, style ); |
| 873 |
< |
|
| 874 |
< |
CreateControls(); |
| 875 |
< |
SetIcon(GetIconResource(wxT("oni_special.ico"))); |
| 876 |
< |
Centre(); |
| 877 |
< |
|
| 921 |
> |
wxFrame::Create( parent, id, caption, pos, size, style ); |
| 922 |
|
|
| 923 |
+ |
CreateControls(); |
| 924 |
+ |
SetIcon(GetIconResource(wxT("aelogosmall.png"))); |
| 925 |
+ |
Centre(); |
| 926 |
|
////@end MainWindow creation |
| 927 |
|
return true; |
| 928 |
|
} |
| 946 |
|
void MainWindow::Init() |
| 947 |
|
{ |
| 948 |
|
////@begin MainWindow member initialisation |
| 949 |
< |
MainSplitter = NULL; |
| 950 |
< |
SelectAll = NULL; |
| 951 |
< |
RefreshButton = NULL; |
| 952 |
< |
Mods_CheckboxList = NULL; |
| 953 |
< |
titleText = NULL; |
| 954 |
< |
creatorText = NULL; |
| 955 |
< |
descriptionText = NULL; |
| 956 |
< |
StatusArea = NULL; |
| 957 |
< |
ProgressBar = NULL; |
| 958 |
< |
InstallButton = NULL; |
| 959 |
< |
OptionsPanel = NULL; |
| 960 |
< |
SepRadio = NULL; |
| 961 |
< |
NoSepRadio = NULL; |
| 962 |
< |
SeparatedRadio = NULL; |
| 963 |
< |
CompleteRadio = NULL; |
| 964 |
< |
ReglobalizeButton = NULL; |
| 949 |
> |
MainSplitter = NULL; |
| 950 |
> |
SelectAll = NULL; |
| 951 |
> |
RefreshButton = NULL; |
| 952 |
> |
Mods_CheckboxList = NULL; |
| 953 |
> |
titleText = NULL; |
| 954 |
> |
creatorText = NULL; |
| 955 |
> |
descriptionText = NULL; |
| 956 |
> |
StatusArea = NULL; |
| 957 |
> |
ProgressBar = NULL; |
| 958 |
> |
InstallButton = NULL; |
| 959 |
> |
OptionsPanel = NULL; |
| 960 |
> |
SepRadio = NULL; |
| 961 |
> |
NoSepRadio = NULL; |
| 962 |
> |
SeperatedRadio = NULL; |
| 963 |
> |
CompleteRadio = NULL; |
| 964 |
> |
ReglobalizeButton = NULL; |
| 965 |
|
////@end MainWindow member initialisation |
| 966 |
|
|
| 967 |
|
} |
| 976 |
|
void MainWindow::CreateControls() |
| 977 |
|
{ |
| 978 |
|
////@begin MainWindow content construction |
| 979 |
< |
// Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered) |
| 933 |
< |
|
| 934 |
< |
MainWindow* itemFrame1 = this; |
| 979 |
> |
MainWindow* itemFrame1 = this; |
| 980 |
|
|
| 981 |
< |
wxMenuBar* menuBar = new wxMenuBar; |
| 982 |
< |
wxMenu* itemMenu37 = new wxMenu; |
| 983 |
< |
{ |
| 984 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 985 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); |
| 986 |
< |
menuItem->SetBitmap(bitmap); |
| 987 |
< |
itemMenu37->Append(menuItem); |
| 988 |
< |
} |
| 989 |
< |
{ |
| 990 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 991 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); |
| 992 |
< |
menuItem->SetBitmap(bitmap); |
| 993 |
< |
itemMenu37->Append(menuItem); |
| 994 |
< |
} |
| 995 |
< |
itemMenu37->AppendSeparator(); |
| 996 |
< |
{ |
| 997 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); |
| 998 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); |
| 999 |
< |
menuItem->SetBitmap(bitmap); |
| 1000 |
< |
itemMenu37->Append(menuItem); |
| 1001 |
< |
} |
| 1002 |
< |
menuBar->Append(itemMenu37, _("&File")); |
| 1003 |
< |
wxMenu* itemMenu42 = new wxMenu; |
| 1004 |
< |
itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); |
| 1005 |
< |
menuBar->Append(itemMenu42, _("Options")); |
| 1006 |
< |
wxMenu* itemMenu44 = new wxMenu; |
| 1007 |
< |
itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL); |
| 981 |
> |
wxMenuBar* menuBar = new wxMenuBar; |
| 982 |
> |
wxMenu* itemMenu37 = new wxMenu; |
| 983 |
> |
{ |
| 984 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 985 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); |
| 986 |
> |
menuItem->SetBitmap(bitmap); |
| 987 |
> |
itemMenu37->Append(menuItem); |
| 988 |
> |
} |
| 989 |
> |
{ |
| 990 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 991 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); |
| 992 |
> |
menuItem->SetBitmap(bitmap); |
| 993 |
> |
itemMenu37->Append(menuItem); |
| 994 |
> |
} |
| 995 |
> |
itemMenu37->AppendSeparator(); |
| 996 |
> |
{ |
| 997 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); |
| 998 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); |
| 999 |
> |
menuItem->SetBitmap(bitmap); |
| 1000 |
> |
itemMenu37->Append(menuItem); |
| 1001 |
> |
} |
| 1002 |
> |
menuBar->Append(itemMenu37, _("&File")); |
| 1003 |
> |
wxMenu* itemMenu42 = new wxMenu; |
| 1004 |
> |
itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); |
| 1005 |
> |
menuBar->Append(itemMenu42, _("Options")); |
| 1006 |
> |
wxMenu* itemMenu44 = new wxMenu; |
| 1007 |
> |
#ifdef WIN32 |
| 1008 |
|
itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1009 |
|
menuBar->Append(itemMenu44, _("Help")); |
| 1010 |
< |
itemFrame1->SetMenuBar(menuBar); |
| 1011 |
< |
|
| 1012 |
< |
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 968 |
< |
itemFrame1->SetSizer(itemBoxSizer2); |
| 1010 |
> |
#else |
| 1011 |
> |
itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1012 |
> |
#endif |
| 1013 |
|
|
| 1014 |
< |
MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); |
| 971 |
< |
MainSplitter->SetMinimumPaneSize(150); |
| 972 |
< |
MainSplitter->SetName(_T("MainSplitter")); |
| 973 |
< |
|
| 974 |
< |
wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 975 |
< |
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); |
| 976 |
< |
itemPanel4->SetSizer(itemBoxSizer5); |
| 977 |
< |
|
| 978 |
< |
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); |
| 979 |
< |
itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); |
| 980 |
< |
SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); |
| 981 |
< |
SelectAll->SetValue(false); |
| 982 |
< |
SelectAll->SetName(_T("SelectAll_Checkbox")); |
| 983 |
< |
itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 984 |
< |
|
| 985 |
< |
RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
| 986 |
< |
RefreshButton->SetName(_T("RefreshButton")); |
| 987 |
< |
itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); |
| 988 |
< |
|
| 989 |
< |
wxArrayString Mods_CheckboxListStrings; |
| 990 |
< |
Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); |
| 991 |
< |
Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); |
| 992 |
< |
itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); |
| 993 |
< |
|
| 994 |
< |
wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 995 |
< |
itemPanel10->SetName(_T("DescriptionHolder_Panel")); |
| 996 |
< |
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); |
| 997 |
< |
itemPanel10->SetSizer(itemBoxSizer11); |
| 998 |
< |
|
| 999 |
< |
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); |
| 1000 |
< |
itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); |
| 1001 |
< |
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); |
| 1002 |
< |
itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); |
| 1003 |
< |
titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); |
| 1004 |
< |
titleText->SetName(_T("Title_Text")); |
| 1005 |
< |
titleText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1006 |
< |
itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); |
| 1007 |
< |
|
| 1008 |
< |
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); |
| 1009 |
< |
itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); |
| 1010 |
< |
creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); |
| 1011 |
< |
creatorText->SetName(_T("Author_Text")); |
| 1012 |
< |
creatorText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1013 |
< |
itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); |
| 1014 |
< |
|
| 1015 |
< |
wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
| 1016 |
< |
itemStaticLine17->Show(false); |
| 1017 |
< |
itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); |
| 1018 |
< |
|
| 1019 |
< |
descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL ); |
| 1020 |
< |
descriptionText->SetName(_T("DescriptionName")); |
| 1021 |
< |
descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1022 |
< |
itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); |
| 1023 |
< |
|
| 1024 |
< |
MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150); |
| 1025 |
< |
itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); |
| 1026 |
< |
|
| 1027 |
< |
StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); |
| 1028 |
< |
StatusArea->SetName(_T("StatusArea")); |
| 1029 |
< |
StatusArea->SetFieldsCount(1); |
| 1030 |
< |
StatusArea->SetStatusText(_("Status Area"), 0); |
| 1031 |
< |
itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); |
| 1032 |
< |
|
| 1033 |
< |
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); |
| 1034 |
< |
itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); |
| 1035 |
< |
|
| 1036 |
< |
ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH ); |
| 1037 |
< |
ProgressBar->SetValue(0); |
| 1038 |
< |
itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); |
| 1039 |
< |
|
| 1040 |
< |
InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 ); |
| 1041 |
< |
itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); |
| 1042 |
< |
|
| 1043 |
< |
wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); |
| 1044 |
< |
itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); |
| 1045 |
< |
|
| 1046 |
< |
OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1047 |
< |
itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); |
| 1048 |
< |
|
| 1049 |
< |
wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); |
| 1050 |
< |
OptionsPanel->SetSizer(itemBoxSizer25); |
| 1051 |
< |
|
| 1052 |
< |
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); |
| 1053 |
< |
itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); |
| 1054 |
< |
|
| 1055 |
< |
SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1056 |
< |
SepRadio->SetValue(false); |
| 1057 |
< |
if (MainWindow::ShowToolTips()) |
| 1058 |
< |
SepRadio->SetToolTip(_("For PC Demo and Mac")); |
| 1059 |
< |
itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1060 |
< |
|
| 1061 |
< |
NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1062 |
< |
NoSepRadio->SetValue(false); |
| 1063 |
< |
if (MainWindow::ShowToolTips()) |
| 1064 |
< |
NoSepRadio->SetToolTip(_("For PC Retail")); |
| 1065 |
< |
itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1066 |
< |
|
| 1067 |
< |
wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1068 |
< |
itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); |
| 1069 |
< |
|
| 1070 |
< |
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); |
| 1071 |
< |
itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); |
| 1072 |
< |
|
| 1073 |
< |
SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1074 |
< |
SeparatedRadio->SetValue(false); |
| 1075 |
< |
SeparatedRadio->SetName(_T("Separated_RadioButton")); |
| 1076 |
< |
itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1077 |
< |
|
| 1078 |
< |
CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1079 |
< |
CompleteRadio->SetValue(false); |
| 1080 |
< |
CompleteRadio->SetName(_T("Complete_RadioButton")); |
| 1081 |
< |
itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1082 |
< |
|
| 1083 |
< |
wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1084 |
< |
itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); |
| 1085 |
< |
|
| 1086 |
< |
wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); |
| 1087 |
< |
itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1088 |
< |
|
| 1089 |
< |
ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1090 |
< |
ReglobalizeButton->SetName(_T("Reglobalize_Button")); |
| 1091 |
< |
itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); |
| 1014 |
> |
itemFrame1->SetMenuBar(menuBar); |
| 1015 |
|
|
| 1016 |
< |
// Connect events and objects |
| 1017 |
< |
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1016 |
> |
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 1017 |
> |
itemFrame1->SetSizer(itemBoxSizer2); |
| 1018 |
> |
|
| 1019 |
> |
MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); |
| 1020 |
> |
MainSplitter->SetMinimumPaneSize(1); |
| 1021 |
> |
MainSplitter->SetName(_T("MainSplitter")); |
| 1022 |
> |
|
| 1023 |
> |
wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1024 |
> |
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); |
| 1025 |
> |
itemPanel4->SetSizer(itemBoxSizer5); |
| 1026 |
> |
|
| 1027 |
> |
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); |
| 1028 |
> |
itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); |
| 1029 |
> |
SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); |
| 1030 |
> |
SelectAll->SetValue(false); |
| 1031 |
> |
SelectAll->SetName(_T("SelectAll_Checkbox")); |
| 1032 |
> |
itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1033 |
> |
|
| 1034 |
> |
RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
| 1035 |
> |
RefreshButton->SetName(_T("RefreshButton")); |
| 1036 |
> |
itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); |
| 1037 |
> |
|
| 1038 |
> |
wxArrayString Mods_CheckboxListStrings; |
| 1039 |
> |
Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); |
| 1040 |
> |
Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); |
| 1041 |
> |
itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); |
| 1042 |
> |
|
| 1043 |
> |
wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1044 |
> |
itemPanel10->SetName(_T("DescriptionHolder_Panel")); |
| 1045 |
> |
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); |
| 1046 |
> |
itemPanel10->SetSizer(itemBoxSizer11); |
| 1047 |
> |
|
| 1048 |
> |
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); |
| 1049 |
> |
itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); |
| 1050 |
> |
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); |
| 1051 |
> |
itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); |
| 1052 |
> |
titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); |
| 1053 |
> |
titleText->SetName(_T("Title_Text")); |
| 1054 |
> |
titleText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1055 |
> |
itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); |
| 1056 |
> |
|
| 1057 |
> |
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); |
| 1058 |
> |
itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); |
| 1059 |
> |
creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); |
| 1060 |
> |
creatorText->SetName(_T("Author_Text")); |
| 1061 |
> |
creatorText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1062 |
> |
itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); |
| 1063 |
> |
|
| 1064 |
> |
wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
| 1065 |
> |
itemStaticLine17->Show(false); |
| 1066 |
> |
itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); |
| 1067 |
> |
|
| 1068 |
> |
descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 ); |
| 1069 |
> |
descriptionText->SetName(_T("DescriptionName")); |
| 1070 |
> |
descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1071 |
> |
itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); |
| 1072 |
> |
|
| 1073 |
> |
MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200); |
| 1074 |
> |
itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); |
| 1075 |
> |
|
| 1076 |
> |
StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); |
| 1077 |
> |
StatusArea->SetName(_T("StatusArea")); |
| 1078 |
> |
StatusArea->SetFieldsCount(1); |
| 1079 |
> |
StatusArea->SetStatusText(_("AE Installer v1.0"), 0); |
| 1080 |
> |
itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); |
| 1081 |
> |
|
| 1082 |
> |
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); |
| 1083 |
> |
itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); |
| 1084 |
> |
|
| 1085 |
> |
ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH ); |
| 1086 |
> |
ProgressBar->SetValue(0); |
| 1087 |
> |
itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); |
| 1088 |
> |
|
| 1089 |
> |
InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1090 |
> |
itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); |
| 1091 |
> |
|
| 1092 |
> |
wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); |
| 1093 |
> |
itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); |
| 1094 |
> |
|
| 1095 |
> |
OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1096 |
> |
itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); |
| 1097 |
> |
|
| 1098 |
> |
wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); |
| 1099 |
> |
OptionsPanel->SetSizer(itemBoxSizer25); |
| 1100 |
> |
|
| 1101 |
> |
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); |
| 1102 |
> |
itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); |
| 1103 |
> |
|
| 1104 |
> |
SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1105 |
> |
SepRadio->SetValue(false); |
| 1106 |
> |
if (MainWindow::ShowToolTips()) |
| 1107 |
> |
SepRadio->SetToolTip(_("For PC Demo and Mac")); |
| 1108 |
> |
itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1109 |
> |
|
| 1110 |
> |
NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1111 |
> |
NoSepRadio->SetValue(false); |
| 1112 |
> |
if (MainWindow::ShowToolTips()) |
| 1113 |
> |
NoSepRadio->SetToolTip(_("For PC Retail")); |
| 1114 |
> |
itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1115 |
> |
|
| 1116 |
> |
wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1117 |
> |
itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); |
| 1118 |
> |
|
| 1119 |
> |
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); |
| 1120 |
> |
itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); |
| 1121 |
> |
|
| 1122 |
> |
SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1123 |
> |
SeperatedRadio->SetValue(false); |
| 1124 |
> |
SeperatedRadio->SetName(_T("Seperated_RadioButton")); |
| 1125 |
> |
itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1126 |
> |
|
| 1127 |
> |
CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1128 |
> |
CompleteRadio->SetValue(false); |
| 1129 |
> |
CompleteRadio->SetName(_T("Complete_RadioButton")); |
| 1130 |
> |
itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1131 |
> |
|
| 1132 |
> |
wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1133 |
> |
itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); |
| 1134 |
> |
|
| 1135 |
> |
wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); |
| 1136 |
> |
itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1137 |
> |
|
| 1138 |
> |
ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1139 |
> |
ReglobalizeButton->SetName(_T("Reglobalize_Button")); |
| 1140 |
> |
itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); |
| 1141 |
> |
|
| 1142 |
> |
// Connect events and objects |
| 1143 |
> |
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1144 |
|
////@end MainWindow content construction |
| 1145 |
|
|
| 1146 |
+ |
Handle = (HWND)GetHWND(); |
| 1147 |
+ |
::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); |
| 1148 |
+ |
|
| 1149 |
+ |
|
| 1150 |
|
if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1151 |
< |
static_cast<string>("-import:sep"); |
| 1151 |
> |
strImportOption = "-import:sep"; |
| 1152 |
|
splitInstances = NOT_SPLIT; |
| 1153 |
|
} |
| 1154 |
|
else { |
| 1155 |
< |
static_cast<string>("-import:nosep"); |
| 1155 |
> |
strImportOption = "-import:nosep"; |
| 1156 |
|
splitInstances = SPLIT; |
| 1157 |
|
} |
| 1158 |
< |
|
| 1158 |
> |
|
| 1159 |
|
globalPackages = getPackages(); |
| 1160 |
|
globalInstalledMods = getInstallString(); |
| 1161 |
|
for (int i = 0; i < globalPackages.size(); i++) { |
| 1167 |
|
TheInstallButton = InstallButton; |
| 1168 |
|
TheProgressBar = ProgressBar; |
| 1169 |
|
OptionsPanel->Hide(); |
| 1170 |
< |
if(splitInstances == SPLIT) SeparatedRadio->SetValue(true); |
| 1170 |
> |
|
| 1171 |
> |
//#ifndef WIN32 |
| 1172 |
> |
// itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1173 |
> |
|
| 1174 |
> |
//#endif |
| 1175 |
> |
|
| 1176 |
> |
if(splitInstances == SPLIT) SeperatedRadio->SetValue(true); |
| 1177 |
|
else CompleteRadio->SetValue(true); |
| 1119 |
– |
|
| 1120 |
– |
|
| 1121 |
– |
|
| 1178 |
|
if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true); |
| 1179 |
|
else SepRadio->SetValue(true); |
| 1180 |
|
|
| 1242 |
|
{ |
| 1243 |
|
// Bitmap retrieval |
| 1244 |
|
////@begin MainWindow bitmap retrieval |
| 1245 |
< |
wxUnusedVar(name); |
| 1246 |
< |
if (name == _T("redo.xpm")) |
| 1247 |
< |
{ |
| 1248 |
< |
wxBitmap bitmap(redo_xpm); |
| 1249 |
< |
return bitmap; |
| 1250 |
< |
} |
| 1251 |
< |
else if (name == _T("fileopen.xpm")) |
| 1252 |
< |
{ |
| 1253 |
< |
wxBitmap bitmap( fileopen_xpm); |
| 1254 |
< |
return bitmap; |
| 1255 |
< |
} |
| 1256 |
< |
else if (name == _T("filesaveas.xpm")) |
| 1257 |
< |
{ |
| 1258 |
< |
wxBitmap bitmap( filesaveas_xpm); |
| 1259 |
< |
return bitmap; |
| 1260 |
< |
} |
| 1261 |
< |
else if (name == _T("quit.xpm")) |
| 1262 |
< |
{ |
| 1263 |
< |
wxBitmap bitmap( quit_xpm); |
| 1264 |
< |
return bitmap; |
| 1265 |
< |
} |
| 1266 |
< |
return wxNullBitmap; |
| 1245 |
> |
wxUnusedVar(name); |
| 1246 |
> |
if (name == _T("undo.xpm")) |
| 1247 |
> |
{ |
| 1248 |
> |
wxBitmap bitmap( undo_xpm); |
| 1249 |
> |
return bitmap; |
| 1250 |
> |
} |
| 1251 |
> |
else if (name == _T("fileopen.xpm")) |
| 1252 |
> |
{ |
| 1253 |
> |
wxBitmap bitmap( fileopen_xpm); |
| 1254 |
> |
return bitmap; |
| 1255 |
> |
} |
| 1256 |
> |
else if (name == _T("filesaveas.xpm")) |
| 1257 |
> |
{ |
| 1258 |
> |
wxBitmap bitmap( filesaveas_xpm); |
| 1259 |
> |
return bitmap; |
| 1260 |
> |
} |
| 1261 |
> |
else if (name == _T("quit.xpm")) |
| 1262 |
> |
{ |
| 1263 |
> |
wxBitmap bitmap( quit_xpm); |
| 1264 |
> |
return bitmap; |
| 1265 |
> |
} |
| 1266 |
> |
return wxNullBitmap; |
| 1267 |
|
////@end MainWindow bitmap retrieval |
| 1268 |
|
} |
| 1269 |
|
|
| 1276 |
|
|
| 1277 |
|
// Icon retrieval |
| 1278 |
|
////@begin MainWindow icon retrieval |
| 1279 |
< |
wxUnusedVar(name); |
| 1280 |
< |
if (name == _T("oni_special.ico")) |
| 1281 |
< |
{ |
| 1282 |
< |
// wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO); |
| 1283 |
< |
// return icon; |
| 1284 |
< |
} |
| 1285 |
< |
return wxNullIcon; |
| 1279 |
> |
wxUnusedVar(name); |
| 1280 |
> |
if (name == _T("aelogosmall.png")) |
| 1281 |
> |
{ |
| 1282 |
> |
wxIcon icon(aelogosmall_xpm); |
| 1283 |
> |
return icon; |
| 1284 |
> |
} |
| 1285 |
> |
return wxNullIcon; |
| 1286 |
|
////@end MainWindow icon retrieval |
| 1287 |
|
} |
| 1288 |
|
|
| 1330 |
|
|
| 1331 |
|
void MainWindow::OnOptionsClick( wxCommandEvent& event ) |
| 1332 |
|
{ |
| 1277 |
– |
|
| 1278 |
– |
|
| 1279 |
– |
|
| 1280 |
– |
|
| 1333 |
|
if (!event.GetInt() ) { |
| 1334 |
|
OptionsPanel->Hide(); |
| 1335 |
+ |
|
| 1336 |
|
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());} |
| 1337 |
|
else { |
| 1338 |
|
// Uncomment this when we release, it gets annoying if you are testing globalization a lot ;) |
| 1339 |
< |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); |
| 1339 |
> |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: These options are for advanced users only, use with caution.", |
| 1340 |
> |
"AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); |
| 1341 |
|
YesNoDialog->ShowModal(); |
| 1342 |
|
OptionsPanel->Show(); |
| 1343 |
< |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()); |
| 1343 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1); |
| 1344 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1); |
| 1345 |
|
} |
| 1291 |
– |
|
| 1346 |
|
} |
| 1347 |
|
|
| 1348 |
|
|
| 1415 |
|
|
| 1416 |
|
void setProgressBar( int i ) { |
| 1417 |
|
//TheProgressBar->SetValue( |
| 1418 |
+ |
#ifdef WIN32 |
| 1419 |
+ |
|
| 1420 |
|
|
| 1421 |
+ |
|
| 1422 |
+ |
if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3))) |
| 1423 |
+ |
{ |
| 1424 |
+ |
|
| 1425 |
+ |
pTaskbarList3->SetProgressValue(Handle,i, 1000); |
| 1426 |
+ |
if ( i == 0 ) { |
| 1427 |
+ |
|
| 1428 |
+ |
pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS); |
| 1429 |
+ |
} |
| 1430 |
+ |
} |
| 1431 |
+ |
|
| 1432 |
+ |
|
| 1433 |
+ |
#endif |
| 1434 |
|
TheProgressBar->SetValue(i); |
| 1435 |
|
|
| 1436 |
|
} |
| 1443 |
|
void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event ) |
| 1444 |
|
{ |
| 1445 |
|
////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. |
| 1446 |
< |
// Before editing this code, remove the block markers. |
| 1447 |
< |
event.Skip(); |
| 1446 |
> |
// Before editing this code, remove the block markers. |
| 1447 |
> |
event.Skip(); |
| 1448 |
|
////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. |
| 1449 |
|
} |
| 1450 |
|
|
| 1456 |
|
void MainWindow::OnAboutClick( wxCommandEvent& event ) |
| 1457 |
|
{ |
| 1458 |
|
////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. |
| 1459 |
< |
// Before editing this code, remove the block markers. |
| 1460 |
< |
About* window = new About(this); |
| 1461 |
< |
int returnValue = window->ShowModal(); |
| 1462 |
< |
window->Destroy(); |
| 1459 |
> |
// Before editing this code, remove the block markers. |
| 1460 |
> |
About* window = new About(this); |
| 1461 |
> |
int returnValue = window->ShowModal(); |
| 1462 |
> |
window->Destroy(); |
| 1463 |
|
////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. |
| 1464 |
|
} |
| 1465 |
|
|
| 1488 |
|
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton |
| 1489 |
|
*/ |
| 1490 |
|
|
| 1422 |
– |
void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event ) |
| 1423 |
– |
{ |
| 1424 |
– |
splitInstances = SPLIT; |
| 1425 |
– |
|
| 1426 |
– |
} |
| 1427 |
– |
|
| 1428 |
– |
|
| 1491 |
|
/* |
| 1492 |
|
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton |
| 1493 |
|
*/ |
| 1611 |
|
|
| 1612 |
|
void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event ) |
| 1613 |
|
{ |
| 1614 |
< |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: This will DELETE the Edition's GameDataFolder and reglobalize all of your data. \n Are you SURE you want to do this? ", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); |
| 1614 |
> |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: This will DELETE the Edition's GameDataFolder and recreate it from the vanilla Oni game data. \n Are you SURE you want to do this? ", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); |
| 1615 |
|
|
| 1616 |
|
if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no... |
| 1617 |
|
|
| 1649 |
|
////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow. |
| 1650 |
|
}*/ |
| 1651 |
|
|
| 1652 |
+ |
|
| 1653 |
+ |
/* |
| 1654 |
+ |
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton |
| 1655 |
+ |
*/ |
| 1656 |
+ |
|
| 1657 |
+ |
void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event ) |
| 1658 |
+ |
{ |
| 1659 |
+ |
splitInstances = SPLIT; |
| 1660 |
+ |
} |
| 1661 |
+ |
|