| 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 |
> |
|
| 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; |
| 121 |
|
path TRAM = Animations / "level0_TRAM"; |
| 122 |
|
|
| 123 |
|
vector<path> GDFPaths; |
| 124 |
< |
GDFPaths.push_back(Characters); |
| 124 |
> |
//GDFPaths.push_back(Characters); |
| 125 |
|
GDFPaths.push_back(Particles); |
| 126 |
|
GDFPaths.push_back(Textures); |
| 127 |
|
GDFPaths.push_back(Sounds); |
| 129 |
|
GDFPaths.push_back(TRAM); |
| 130 |
|
|
| 131 |
|
|
| 132 |
< |
path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni"; |
| 133 |
< |
path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni"; |
| 134 |
< |
path VanillaTextures = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni"; |
| 135 |
< |
path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni"; |
| 136 |
< |
path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni"; |
| 137 |
< |
path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni"; |
| 138 |
< |
path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni"; |
| 132 |
> |
path VanillaCharacters = "VanillaDats/level0_Final/level0_Characters/level0_Characters.oni"; |
| 133 |
> |
path VanillaParticles = "VanillaDats/level0_Final/level0_Particles/level0_Particles.oni"; |
| 134 |
> |
path VanillaTextures = "VanillaDats/level0_Final/level0_Textures/level0_Textures.oni"; |
| 135 |
> |
path VanillaSounds = "VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni"; |
| 136 |
> |
path VanillaAnimations = "VanillaDats/level0_Final/level0_Animations/level0_Animations.oni"; |
| 137 |
> |
path VanillaTRAC = "VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni"; |
| 138 |
> |
path VanillaTRAM = "VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni"; |
| 139 |
|
|
| 140 |
|
vector<path> VanillaPaths; |
| 141 |
|
|
| 142 |
< |
VanillaPaths.push_back(VanillaCharacters); |
| 142 |
> |
//VanillaPaths.push_back(VanillaCharacters); |
| 143 |
|
VanillaPaths.push_back(VanillaParticles); |
| 144 |
|
VanillaPaths.push_back(VanillaTextures); |
| 145 |
|
VanillaPaths.push_back(VanillaSounds); |
| 169 |
|
|
| 170 |
|
create_directory( "packages" ); |
| 171 |
|
|
| 172 |
< |
if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats"); |
| 173 |
< |
create_directory( "packages/VanillaDats" ); |
| 174 |
< |
|
| 153 |
< |
create_directory( "packages/VanillaDats/level0_Final/" ); |
| 172 |
> |
if (exists("VanillaDats")) remove_all("VanillaDats"); |
| 173 |
> |
create_directory( "VanillaDats" ); |
| 174 |
> |
create_directory( "VanillaDats/level0_Final/" ); |
| 175 |
|
//blah blah finish this. |
| 176 |
< |
//logfile << "packages/VanillaDats/level0_Final/ created"; |
| 176 |
> |
//logfile << "VanillaDats/level0_Final/ created"; |
| 177 |
|
create_directory( Characters ); |
| 178 |
|
create_directory( Particles ); |
| 179 |
|
create_directory( Archive ); |
| 205 |
|
create_directory( "../GameDataFolder/level" + levels[i] + "_Final" ); |
| 206 |
|
// setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat"); |
| 207 |
|
system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str()); |
| 208 |
< |
create_directory( "packages/VanillaDats/level" + levels[i] + "_Final" ); |
| 209 |
< |
create_directory( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); |
| 208 |
> |
create_directory( "VanillaDats/level" + levels[i] + "_Final" ); |
| 209 |
> |
create_directory( "VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); |
| 210 |
|
|
| 211 |
|
directory_iterator end_iter; |
| 212 |
|
for ( directory_iterator dir_itr( "../GameDataFolder/level" + levels[i] + "_Final" ); dir_itr != end_iter; ++dir_itr ) |
| 229 |
|
else remove(dir_itr->path()); |
| 230 |
|
} |
| 231 |
|
else if (dir_itr->path().filename().substr(0,4) == "TRAC" |
| 232 |
< |
|| dir_itr->path().filename().substr(0,4) == "ONVL") { |
| 232 |
> |
) { |
| 233 |
|
cout <<dir_itr->path().filename() << "\n"; |
| 234 |
|
if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename()); |
| 235 |
|
else remove(dir_itr->path()); |
| 249 |
|
else if (dir_itr->path().filename().substr(0,4) == "ONCC" |
| 250 |
|
|| dir_itr->path().filename().substr(0,4) == "TRBS" |
| 251 |
|
|| dir_itr->path().filename().substr(0,4) == "ONCV" |
| 252 |
+ |
|| dir_itr->path().filename().substr(0,4) == "ONVL" |
| 253 |
|
|| dir_itr->path().filename().substr(0,4) == "TRMA" |
| 254 |
|
|| dir_itr->path().filename().substr(0,4) == "TRSC" |
| 255 |
|
|| dir_itr->path().filename().substr(0,4) == "TRAS") { |
| 284 |
|
if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename()); |
| 285 |
|
else remove(dir_itr->path()); |
| 286 |
|
} |
| 287 |
+ |
else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding |
| 288 |
+ |
cout <<dir_itr->path().filename() << "\n"; |
| 289 |
+ |
|
| 290 |
+ |
if(!exists( "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename())) rename(dir_itr->path(), "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename()); |
| 291 |
+ |
else remove(dir_itr->path()); |
| 292 |
+ |
} |
| 293 |
+ |
|
| 294 |
|
if (exists(dir_itr->path())) { |
| 295 |
|
|
| 296 |
|
} |
| 297 |
|
else { |
| 298 |
< |
//logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 298 |
> |
logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 299 |
|
} |
| 300 |
|
} |
| 301 |
|
|
| 317 |
|
//printf(levels[i],"%d",levels[i]); |
| 318 |
|
//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"); |
| 319 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni"); |
| 320 |
< |
system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 321 |
< |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str()); |
| 320 |
> |
logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" |
| 321 |
> |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n'; |
| 322 |
> |
string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" |
| 323 |
> |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni"); |
| 324 |
> |
system(sys_str.c_str() ); |
| 325 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 326 |
|
parts_done++; |
| 327 |
|
} |
| 328 |
< |
create_directory( VanillaCharacters.parent_path() ); |
| 328 |
> |
//create_directory( VanillaCharacters.parent_path() ); |
| 329 |
|
create_directory( VanillaParticles.parent_path() ); |
| 330 |
|
create_directory( VanillaTextures.parent_path() ); |
| 331 |
|
create_directory( VanillaSounds.parent_path() ); |
| 338 |
|
parts_done++; |
| 339 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 340 |
|
} |
| 341 |
+ |
logfile << "\nMoving level0_Characters\n"; |
| 342 |
+ |
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": moving level0_Characters" ); |
| 343 |
+ |
copy((path)"../GameDataFolder/level0_Characters", (path)("VanillaDats/level0_Final")); |
| 344 |
|
/* |
| 345 |
|
printf(Step_x_x,"Step %d/%d: reimporting level0_Characters", parts_done,7 + 2 * num_levels); setStatusArea((string)Step_x_x);setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) )); |
| 346 |
|
system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str()); |
| 360 |
|
*/ |
| 361 |
|
create_directory((path)"../GameDataFolder/IGMD"); |
| 362 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
| 363 |
< |
setProgressBar( 1000 ); |
| 363 |
> |
setProgressBar( 1000 ); |
| 364 |
> |
|
| 365 |
> |
if(exists("../../persist.dat")) if(!exists("../persist.dat")) |
| 366 |
> |
copy("../../persist.dat",".."); |
| 367 |
> |
if(exists("../../key_config.txt"))if(!exists("../key_config.txt")) |
| 368 |
> |
copy("../../key_config.txt",".."); |
| 369 |
> |
|
| 370 |
> |
#ifndef WIN32 |
| 371 |
> |
/* 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). |
| 372 |
> |
Tests for presence of prefs with [ -f ] before doing anything so it doesn't create a partial prefs file -- just in case user has never |
| 373 |
> |
run Oni before :-p */ |
| 374 |
> |
string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for edition/ |
| 375 |
> |
char prefsCommand[300] = "[ -f ~/Library/Preferences/com.godgames.oni.plist ] && defaults write com.godgames.oni RetailInstallationPath -string '"; |
| 376 |
> |
strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) |
| 377 |
> |
strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters |
| 378 |
> |
system(prefsCommand); |
| 379 |
> |
|
| 380 |
> |
#endif |
| 381 |
> |
|
| 382 |
> |
|
| 383 |
|
setStatusArea((string)"Done! Now select your mod packages and click install."); |
| 384 |
|
// while(1) Sleep(-1); |
| 385 |
|
|
| 386 |
|
} |
| 387 |
< |
catch (exception ex) { |
| 387 |
> |
catch (exception & ex) { |
| 388 |
|
setStatusArea("Warning, handled exception: " + (string)ex.what()); |
| 389 |
|
} |
| 390 |
|
|
| 545 |
|
} |
| 546 |
|
|
| 547 |
|
void recompileAll(vector<string> installedMods) |
| 548 |
< |
{ |
| 548 |
> |
{try { |
| 549 |
|
busy = 1; |
| 550 |
|
using namespace boost::gregorian; |
| 551 |
|
using namespace boost::posix_time; |
| 552 |
|
using boost::lexical_cast; |
| 553 |
|
using boost::bad_lexical_cast; |
| 554 |
< |
|
| 501 |
< |
setStatusArea("Importing levels..."); |
| 502 |
< |
//setStatusArea("Recompiling Data..."); |
| 503 |
< |
path vanilla_dir = "./packages/VanillaDats/"; |
| 554 |
> |
path vanilla_dir = "./VanillaDats/"; |
| 555 |
|
string importCommand = ""; |
| 556 |
|
char statusString[128]; |
| 557 |
|
int numberOfDats = 0; |
| 558 |
|
int j = 1; |
| 559 |
|
string datString; |
| 560 |
+ |
|
| 561 |
+ |
|
| 562 |
+ |
setStatusArea("Importing levels..."); |
| 563 |
+ |
//setStatusArea("Recompiling Data..."); |
| 564 |
+ |
|
| 565 |
|
std::stringstream out; |
| 566 |
|
|
| 567 |
|
ptime start_time(second_clock::local_time()); |
| 568 |
|
clearOldDats(); |
| 569 |
< |
remove("Install.log"); |
| 569 |
> |
|
| 570 |
> |
if(exists("Install.log")) remove("Install.log"); |
| 571 |
|
ofstream logfile("Install.log"); |
| 572 |
|
logfile << "Mod Installation started " << to_simple_string(start_time) << endl; |
| 573 |
|
logfile.close(); |
| 574 |
+ |
|
| 575 |
+ |
|
| 576 |
|
if(splitInstances == SPLIT){ |
| 577 |
|
recursive_directory_iterator end_iter; |
| 578 |
|
|
| 586 |
|
numberOfDats++; |
| 587 |
|
} |
| 588 |
|
} |
| 589 |
< |
catch(exception ex) { |
| 589 |
> |
catch(exception & ex) { |
| 590 |
> |
remove("Install.log"); |
| 591 |
> |
ofstream logfile("Install.log"); |
| 592 |
> |
|
| 593 |
|
|
| 594 |
+ |
logfile << "Warning, exception " << ex.what() << "!"; |
| 595 |
+ |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 596 |
+ |
logfile.close(); |
| 597 |
|
} |
| 598 |
|
} |
| 599 |
< |
|
| 599 |
> |
try { |
| 600 |
|
//recursive_directory_iterator end_iter; |
| 601 |
< |
|
| 601 |
> |
|
| 602 |
|
|
| 603 |
|
out << numberOfDats; |
| 604 |
|
datString = out.str(); |
| 540 |
– |
try { |
| 605 |
|
for ( recursive_directory_iterator dir_itr( vanilla_dir ); |
| 606 |
|
dir_itr != end_iter; |
| 607 |
|
++dir_itr ) |
| 615 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) |
| 616 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); |
| 617 |
|
|
| 618 |
< |
//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/"; |
| 618 |
> |
//else cout << " VanillaDats/" + installedMods[i] + "/oni/"; |
| 619 |
|
} |
| 620 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 621 |
|
|
| 683 |
|
{ |
| 684 |
|
if ( is_directory( dir_itr->status() ) ) |
| 685 |
|
{ |
| 686 |
< |
importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename() |
| 623 |
< |
+ ".dat"; |
| 686 |
> |
importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " "; |
| 687 |
|
for (int i = 0; i < installedMods.size(); ++i) { |
| 688 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename() )) |
| 689 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename(); |
| 732 |
|
|
| 733 |
|
Sleep(1000); |
| 734 |
|
setProgressBar(0); |
| 735 |
< |
busy = 0; |
| 735 |
> |
|
| 736 |
|
} |
| 737 |
+ |
catch(exception & ex) { |
| 738 |
+ |
remove("Install.log"); |
| 739 |
+ |
ofstream logfile("Install.log"); |
| 740 |
+ |
|
| 741 |
+ |
|
| 742 |
+ |
logfile << "Warning, exception " << ex.what() << "!"; |
| 743 |
+ |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 744 |
+ |
logfile.close(); |
| 745 |
+ |
} |
| 746 |
+ |
busy = 0; |
| 747 |
+ |
} |
| 748 |
+ |
|
| 749 |
|
|
| 750 |
|
void writeInstalledMods(vector<string> installedMods) |
| 751 |
|
{ |
| 856 |
|
#endif |
| 857 |
|
|
| 858 |
|
////@begin includes |
| 859 |
< |
#include "about_window.h" |
| 859 |
> |
#include "about.h" |
| 860 |
|
////@end includes |
| 861 |
|
|
| 862 |
|
#include "main_window.h" |
| 863 |
|
|
| 864 |
|
////@begin XPM images |
| 865 |
< |
#include "redo.xpm" |
| 865 |
> |
#include "aelogosmall.xpm" |
| 866 |
> |
#include "undo.xpm" |
| 867 |
|
#include "fileopen.xpm" |
| 868 |
|
#include "filesaveas.xpm" |
| 869 |
|
#include "quit.xpm" |
| 886 |
|
BEGIN_EVENT_TABLE( MainWindow, wxFrame ) |
| 887 |
|
|
| 888 |
|
////@begin MainWindow event table entries |
| 889 |
< |
EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) |
| 889 |
> |
EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) |
| 890 |
|
|
| 891 |
< |
EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) |
| 891 |
> |
EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) |
| 892 |
|
|
| 893 |
< |
EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) |
| 894 |
< |
EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) |
| 893 |
> |
EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) |
| 894 |
> |
EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) |
| 895 |
|
|
| 896 |
< |
EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) |
| 896 |
> |
EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) |
| 897 |
|
|
| 898 |
< |
EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) |
| 898 |
> |
EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) |
| 899 |
|
|
| 900 |
< |
EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) |
| 900 |
> |
EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) |
| 901 |
|
|
| 902 |
< |
EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) |
| 902 |
> |
EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) |
| 903 |
|
|
| 904 |
< |
EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected ) |
| 904 |
> |
EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected ) |
| 905 |
|
|
| 906 |
< |
EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) |
| 906 |
> |
EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) |
| 907 |
|
|
| 908 |
< |
EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) |
| 908 |
> |
EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) |
| 909 |
|
|
| 910 |
< |
EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) |
| 910 |
> |
EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) |
| 911 |
|
|
| 912 |
< |
EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) |
| 912 |
> |
EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) |
| 913 |
|
|
| 914 |
< |
EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) |
| 914 |
> |
EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) |
| 915 |
|
|
| 916 |
< |
EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) |
| 916 |
> |
EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) |
| 917 |
|
|
| 918 |
< |
EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) |
| 918 |
> |
EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) |
| 919 |
|
|
| 920 |
|
////@end MainWindow event table entries |
| 921 |
|
|
| 945 |
|
bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) |
| 946 |
|
{ |
| 947 |
|
////@begin MainWindow creation |
| 948 |
< |
wxFrame::Create( parent, id, caption, pos, size, style ); |
| 873 |
< |
|
| 874 |
< |
CreateControls(); |
| 875 |
< |
SetIcon(GetIconResource(wxT("oni_special.ico"))); |
| 876 |
< |
Centre(); |
| 877 |
< |
|
| 948 |
> |
wxFrame::Create( parent, id, caption, pos, size, style ); |
| 949 |
|
|
| 950 |
+ |
CreateControls(); |
| 951 |
+ |
SetIcon(GetIconResource(wxT("aelogosmall.png"))); |
| 952 |
+ |
Centre(); |
| 953 |
|
////@end MainWindow creation |
| 954 |
|
return true; |
| 955 |
|
} |
| 973 |
|
void MainWindow::Init() |
| 974 |
|
{ |
| 975 |
|
////@begin MainWindow member initialisation |
| 976 |
< |
MainSplitter = NULL; |
| 977 |
< |
SelectAll = NULL; |
| 978 |
< |
RefreshButton = NULL; |
| 979 |
< |
Mods_CheckboxList = NULL; |
| 980 |
< |
titleText = NULL; |
| 981 |
< |
creatorText = NULL; |
| 982 |
< |
descriptionText = NULL; |
| 983 |
< |
StatusArea = NULL; |
| 984 |
< |
ProgressBar = NULL; |
| 985 |
< |
InstallButton = NULL; |
| 986 |
< |
OptionsPanel = NULL; |
| 987 |
< |
SepRadio = NULL; |
| 988 |
< |
NoSepRadio = NULL; |
| 989 |
< |
SeparatedRadio = NULL; |
| 990 |
< |
CompleteRadio = NULL; |
| 991 |
< |
ReglobalizeButton = NULL; |
| 976 |
> |
MainSplitter = NULL; |
| 977 |
> |
SelectAll = NULL; |
| 978 |
> |
RefreshButton = NULL; |
| 979 |
> |
Mods_CheckboxList = NULL; |
| 980 |
> |
titleText = NULL; |
| 981 |
> |
creatorText = NULL; |
| 982 |
> |
descriptionText = NULL; |
| 983 |
> |
StatusArea = NULL; |
| 984 |
> |
ProgressBar = NULL; |
| 985 |
> |
InstallButton = NULL; |
| 986 |
> |
OptionsPanel = NULL; |
| 987 |
> |
SepRadio = NULL; |
| 988 |
> |
NoSepRadio = NULL; |
| 989 |
> |
SeperatedRadio = NULL; |
| 990 |
> |
CompleteRadio = NULL; |
| 991 |
> |
ReglobalizeButton = NULL; |
| 992 |
|
////@end MainWindow member initialisation |
| 993 |
|
|
| 994 |
|
} |
| 1003 |
|
void MainWindow::CreateControls() |
| 1004 |
|
{ |
| 1005 |
|
////@begin MainWindow content construction |
| 1006 |
< |
// Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered) |
| 1006 |
> |
MainWindow* itemFrame1 = this; |
| 1007 |
|
|
| 1008 |
< |
MainWindow* itemFrame1 = this; |
| 1009 |
< |
|
| 1010 |
< |
wxMenuBar* menuBar = new wxMenuBar; |
| 1011 |
< |
wxMenu* itemMenu37 = new wxMenu; |
| 1012 |
< |
{ |
| 1013 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 1014 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); |
| 1015 |
< |
menuItem->SetBitmap(bitmap); |
| 1016 |
< |
itemMenu37->Append(menuItem); |
| 1017 |
< |
} |
| 1018 |
< |
{ |
| 1019 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 1020 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); |
| 1021 |
< |
menuItem->SetBitmap(bitmap); |
| 1022 |
< |
itemMenu37->Append(menuItem); |
| 1023 |
< |
} |
| 1024 |
< |
itemMenu37->AppendSeparator(); |
| 1025 |
< |
{ |
| 1026 |
< |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); |
| 1027 |
< |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); |
| 1028 |
< |
menuItem->SetBitmap(bitmap); |
| 1029 |
< |
itemMenu37->Append(menuItem); |
| 1030 |
< |
} |
| 1031 |
< |
menuBar->Append(itemMenu37, _("&File")); |
| 1032 |
< |
wxMenu* itemMenu42 = new wxMenu; |
| 1033 |
< |
itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); |
| 1034 |
< |
menuBar->Append(itemMenu42, _("Options")); |
| 961 |
< |
wxMenu* itemMenu44 = new wxMenu; |
| 962 |
< |
itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL); |
| 1008 |
> |
wxMenuBar* menuBar = new wxMenuBar; |
| 1009 |
> |
wxMenu* itemMenu37 = new wxMenu; |
| 1010 |
> |
{ |
| 1011 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 1012 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); |
| 1013 |
> |
menuItem->SetBitmap(bitmap); |
| 1014 |
> |
itemMenu37->Append(menuItem); |
| 1015 |
> |
} |
| 1016 |
> |
{ |
| 1017 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); |
| 1018 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); |
| 1019 |
> |
menuItem->SetBitmap(bitmap); |
| 1020 |
> |
itemMenu37->Append(menuItem); |
| 1021 |
> |
} |
| 1022 |
> |
itemMenu37->AppendSeparator(); |
| 1023 |
> |
{ |
| 1024 |
> |
wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); |
| 1025 |
> |
wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); |
| 1026 |
> |
menuItem->SetBitmap(bitmap); |
| 1027 |
> |
itemMenu37->Append(menuItem); |
| 1028 |
> |
} |
| 1029 |
> |
menuBar->Append(itemMenu37, _("&File")); |
| 1030 |
> |
wxMenu* itemMenu42 = new wxMenu; |
| 1031 |
> |
itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); |
| 1032 |
> |
menuBar->Append(itemMenu42, _("Options")); |
| 1033 |
> |
wxMenu* itemMenu44 = new wxMenu; |
| 1034 |
> |
#ifdef WIN32 |
| 1035 |
|
itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1036 |
|
menuBar->Append(itemMenu44, _("Help")); |
| 1037 |
< |
itemFrame1->SetMenuBar(menuBar); |
| 1038 |
< |
|
| 1039 |
< |
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 1040 |
< |
itemFrame1->SetSizer(itemBoxSizer2); |
| 1037 |
> |
#else |
| 1038 |
> |
itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1039 |
> |
#endif |
| 1040 |
> |
|
| 1041 |
> |
itemFrame1->SetMenuBar(menuBar); |
| 1042 |
> |
|
| 1043 |
> |
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 1044 |
> |
itemFrame1->SetSizer(itemBoxSizer2); |
| 1045 |
|
|
| 1046 |
< |
MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); |
| 1047 |
< |
MainSplitter->SetMinimumPaneSize(150); |
| 1048 |
< |
MainSplitter->SetName(_T("MainSplitter")); |
| 1049 |
< |
|
| 1050 |
< |
wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1051 |
< |
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); |
| 1052 |
< |
itemPanel4->SetSizer(itemBoxSizer5); |
| 1053 |
< |
|
| 1054 |
< |
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); |
| 1055 |
< |
itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); |
| 1056 |
< |
SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); |
| 1057 |
< |
SelectAll->SetValue(false); |
| 1058 |
< |
SelectAll->SetName(_T("SelectAll_Checkbox")); |
| 1059 |
< |
itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1060 |
< |
|
| 1061 |
< |
RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
| 1062 |
< |
RefreshButton->SetName(_T("RefreshButton")); |
| 1063 |
< |
itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); |
| 1064 |
< |
|
| 1065 |
< |
wxArrayString Mods_CheckboxListStrings; |
| 1066 |
< |
Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); |
| 1067 |
< |
Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); |
| 1068 |
< |
itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); |
| 1069 |
< |
|
| 1070 |
< |
wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1071 |
< |
itemPanel10->SetName(_T("DescriptionHolder_Panel")); |
| 1072 |
< |
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); |
| 1073 |
< |
itemPanel10->SetSizer(itemBoxSizer11); |
| 1074 |
< |
|
| 1075 |
< |
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); |
| 1076 |
< |
itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); |
| 1077 |
< |
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); |
| 1078 |
< |
itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); |
| 1079 |
< |
titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); |
| 1080 |
< |
titleText->SetName(_T("Title_Text")); |
| 1081 |
< |
titleText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1082 |
< |
itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); |
| 1083 |
< |
|
| 1084 |
< |
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); |
| 1085 |
< |
itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); |
| 1086 |
< |
creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); |
| 1087 |
< |
creatorText->SetName(_T("Author_Text")); |
| 1088 |
< |
creatorText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1089 |
< |
itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); |
| 1090 |
< |
|
| 1091 |
< |
wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
| 1092 |
< |
itemStaticLine17->Show(false); |
| 1093 |
< |
itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); |
| 1094 |
< |
|
| 1095 |
< |
descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL ); |
| 1096 |
< |
descriptionText->SetName(_T("DescriptionName")); |
| 1097 |
< |
descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1098 |
< |
itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); |
| 1099 |
< |
|
| 1100 |
< |
MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150); |
| 1101 |
< |
itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); |
| 1102 |
< |
|
| 1103 |
< |
StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); |
| 1104 |
< |
StatusArea->SetName(_T("StatusArea")); |
| 1105 |
< |
StatusArea->SetFieldsCount(1); |
| 1106 |
< |
StatusArea->SetStatusText(_("Status Area"), 0); |
| 1107 |
< |
itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); |
| 1108 |
< |
|
| 1109 |
< |
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); |
| 1110 |
< |
itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); |
| 1111 |
< |
|
| 1112 |
< |
ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH ); |
| 1113 |
< |
ProgressBar->SetValue(0); |
| 1114 |
< |
itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); |
| 1115 |
< |
|
| 1116 |
< |
InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 ); |
| 1117 |
< |
itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); |
| 1118 |
< |
|
| 1119 |
< |
wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); |
| 1120 |
< |
itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); |
| 1121 |
< |
|
| 1122 |
< |
OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1123 |
< |
itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); |
| 1124 |
< |
|
| 1125 |
< |
wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); |
| 1126 |
< |
OptionsPanel->SetSizer(itemBoxSizer25); |
| 1127 |
< |
|
| 1128 |
< |
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); |
| 1129 |
< |
itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); |
| 1130 |
< |
|
| 1131 |
< |
SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1132 |
< |
SepRadio->SetValue(false); |
| 1133 |
< |
if (MainWindow::ShowToolTips()) |
| 1134 |
< |
SepRadio->SetToolTip(_("For PC Demo and Mac")); |
| 1135 |
< |
itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1136 |
< |
|
| 1137 |
< |
NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1138 |
< |
NoSepRadio->SetValue(false); |
| 1139 |
< |
if (MainWindow::ShowToolTips()) |
| 1140 |
< |
NoSepRadio->SetToolTip(_("For PC Retail")); |
| 1141 |
< |
itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1142 |
< |
|
| 1143 |
< |
wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1144 |
< |
itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); |
| 1145 |
< |
|
| 1146 |
< |
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); |
| 1147 |
< |
itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); |
| 1148 |
< |
|
| 1149 |
< |
SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1150 |
< |
SeparatedRadio->SetValue(false); |
| 1151 |
< |
SeparatedRadio->SetName(_T("Separated_RadioButton")); |
| 1152 |
< |
itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1153 |
< |
|
| 1154 |
< |
CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1155 |
< |
CompleteRadio->SetValue(false); |
| 1156 |
< |
CompleteRadio->SetName(_T("Complete_RadioButton")); |
| 1157 |
< |
itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1158 |
< |
|
| 1159 |
< |
wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1160 |
< |
itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); |
| 1161 |
< |
|
| 1162 |
< |
wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); |
| 1163 |
< |
itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1164 |
< |
|
| 1165 |
< |
ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1166 |
< |
ReglobalizeButton->SetName(_T("Reglobalize_Button")); |
| 1167 |
< |
itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); |
| 1046 |
> |
MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); |
| 1047 |
> |
MainSplitter->SetMinimumPaneSize(1); |
| 1048 |
> |
MainSplitter->SetName(_T("MainSplitter")); |
| 1049 |
> |
|
| 1050 |
> |
wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1051 |
> |
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); |
| 1052 |
> |
itemPanel4->SetSizer(itemBoxSizer5); |
| 1053 |
> |
|
| 1054 |
> |
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); |
| 1055 |
> |
itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); |
| 1056 |
> |
SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); |
| 1057 |
> |
SelectAll->SetValue(false); |
| 1058 |
> |
SelectAll->SetName(_T("SelectAll_Checkbox")); |
| 1059 |
> |
itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1060 |
> |
|
| 1061 |
> |
RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
| 1062 |
> |
RefreshButton->SetName(_T("RefreshButton")); |
| 1063 |
> |
itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); |
| 1064 |
> |
|
| 1065 |
> |
wxArrayString Mods_CheckboxListStrings; |
| 1066 |
> |
Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); |
| 1067 |
> |
Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); |
| 1068 |
> |
itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); |
| 1069 |
> |
|
| 1070 |
> |
wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1071 |
> |
itemPanel10->SetName(_T("DescriptionHolder_Panel")); |
| 1072 |
> |
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); |
| 1073 |
> |
itemPanel10->SetSizer(itemBoxSizer11); |
| 1074 |
> |
|
| 1075 |
> |
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); |
| 1076 |
> |
itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); |
| 1077 |
> |
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); |
| 1078 |
> |
itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); |
| 1079 |
> |
titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); |
| 1080 |
> |
titleText->SetName(_T("Title_Text")); |
| 1081 |
> |
titleText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1082 |
> |
itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); |
| 1083 |
> |
|
| 1084 |
> |
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); |
| 1085 |
> |
itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); |
| 1086 |
> |
creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); |
| 1087 |
> |
creatorText->SetName(_T("Author_Text")); |
| 1088 |
> |
creatorText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1089 |
> |
itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); |
| 1090 |
> |
|
| 1091 |
> |
wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
| 1092 |
> |
itemStaticLine17->Show(false); |
| 1093 |
> |
itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); |
| 1094 |
> |
|
| 1095 |
> |
descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 ); |
| 1096 |
> |
descriptionText->SetName(_T("DescriptionName")); |
| 1097 |
> |
descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); |
| 1098 |
> |
itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); |
| 1099 |
> |
|
| 1100 |
> |
MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200); |
| 1101 |
> |
itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); |
| 1102 |
> |
|
| 1103 |
> |
StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); |
| 1104 |
> |
StatusArea->SetName(_T("StatusArea")); |
| 1105 |
> |
StatusArea->SetFieldsCount(1); |
| 1106 |
> |
StatusArea->SetStatusText(_("AE Installer v1.0.1"), 0); |
| 1107 |
> |
itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); |
| 1108 |
> |
|
| 1109 |
> |
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); |
| 1110 |
> |
itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); |
| 1111 |
> |
|
| 1112 |
> |
ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH ); |
| 1113 |
> |
ProgressBar->SetValue(0); |
| 1114 |
> |
itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); |
| 1115 |
> |
|
| 1116 |
> |
InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1117 |
> |
itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); |
| 1118 |
> |
|
| 1119 |
> |
wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); |
| 1120 |
> |
itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); |
| 1121 |
> |
|
| 1122 |
> |
OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); |
| 1123 |
> |
itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); |
| 1124 |
> |
|
| 1125 |
> |
wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); |
| 1126 |
> |
OptionsPanel->SetSizer(itemBoxSizer25); |
| 1127 |
> |
|
| 1128 |
> |
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); |
| 1129 |
> |
itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); |
| 1130 |
> |
|
| 1131 |
> |
SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1132 |
> |
SepRadio->SetValue(false); |
| 1133 |
> |
if (MainWindow::ShowToolTips()) |
| 1134 |
> |
SepRadio->SetToolTip(_("For PC Demo and Mac")); |
| 1135 |
> |
itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1136 |
> |
|
| 1137 |
> |
NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1138 |
> |
NoSepRadio->SetValue(false); |
| 1139 |
> |
if (MainWindow::ShowToolTips()) |
| 1140 |
> |
NoSepRadio->SetToolTip(_("For PC Retail")); |
| 1141 |
> |
itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1142 |
> |
|
| 1143 |
> |
wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1144 |
> |
itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); |
| 1145 |
> |
|
| 1146 |
> |
wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); |
| 1147 |
> |
itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); |
| 1148 |
> |
|
| 1149 |
> |
SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
| 1150 |
> |
SeperatedRadio->SetValue(false); |
| 1151 |
> |
SeperatedRadio->SetName(_T("Seperated_RadioButton")); |
| 1152 |
> |
itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1153 |
> |
|
| 1154 |
> |
CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1155 |
> |
CompleteRadio->SetValue(false); |
| 1156 |
> |
CompleteRadio->SetName(_T("Complete_RadioButton")); |
| 1157 |
> |
itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); |
| 1158 |
> |
|
| 1159 |
> |
wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); |
| 1160 |
> |
itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); |
| 1161 |
> |
|
| 1162 |
> |
wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); |
| 1163 |
> |
itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); |
| 1164 |
> |
|
| 1165 |
> |
ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 1166 |
> |
ReglobalizeButton->SetName(_T("Reglobalize_Button")); |
| 1167 |
> |
itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); |
| 1168 |
|
|
| 1169 |
< |
// Connect events and objects |
| 1170 |
< |
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1169 |
> |
// Connect events and objects |
| 1170 |
> |
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1171 |
|
////@end MainWindow content construction |
| 1172 |
+ |
#ifdef WIN32 |
| 1173 |
+ |
Handle = (HWND)GetHWND(); |
| 1174 |
+ |
::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); |
| 1175 |
+ |
#endif |
| 1176 |
|
|
| 1177 |
< |
if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1178 |
< |
static_cast<string>("-import:sep"); |
| 1177 |
> |
|
| 1178 |
> |
/*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1179 |
> |
strImportOption = "-import:sep"; |
| 1180 |
|
splitInstances = NOT_SPLIT; |
| 1181 |
|
} |
| 1182 |
|
else { |
| 1183 |
< |
static_cast<string>("-import:nosep"); |
| 1183 |
> |
strImportOption = "-import:nosep"; |
| 1184 |
|
splitInstances = SPLIT; |
| 1185 |
< |
} |
| 1185 |
> |
}*/ |
| 1186 |
> |
|
| 1187 |
|
|
| 1188 |
+ |
#ifndef WIN32 |
| 1189 |
+ |
strImportOption = "-import:sep"; |
| 1190 |
+ |
splitInstances = NOT_SPLIT; |
| 1191 |
+ |
#else |
| 1192 |
+ |
strImportOption = "-import:nosep"; |
| 1193 |
+ |
splitInstances = SPLIT; |
| 1194 |
+ |
#endif |
| 1195 |
+ |
|
| 1196 |
+ |
#ifndef WIN32 |
| 1197 |
+ |
strImportOption = "-import:sep"; |
| 1198 |
+ |
splitInstances = NOT_SPLIT; |
| 1199 |
+ |
#else |
| 1200 |
+ |
strImportOption = "-import:nosep"; |
| 1201 |
+ |
splitInstances = SPLIT; |
| 1202 |
+ |
#endif |
| 1203 |
+ |
|
| 1204 |
|
globalPackages = getPackages(); |
| 1205 |
|
globalInstalledMods = getInstallString(); |
| 1206 |
|
for (int i = 0; i < globalPackages.size(); i++) { |
| 1212 |
|
TheInstallButton = InstallButton; |
| 1213 |
|
TheProgressBar = ProgressBar; |
| 1214 |
|
OptionsPanel->Hide(); |
| 1215 |
< |
if(splitInstances == SPLIT) SeparatedRadio->SetValue(true); |
| 1215 |
> |
|
| 1216 |
> |
//#ifndef WIN32 |
| 1217 |
> |
// itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1218 |
> |
|
| 1219 |
> |
//#endif |
| 1220 |
> |
|
| 1221 |
> |
if(splitInstances == SPLIT) SeperatedRadio->SetValue(true); |
| 1222 |
|
else CompleteRadio->SetValue(true); |
| 1119 |
– |
|
| 1120 |
– |
|
| 1121 |
– |
|
| 1223 |
|
if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true); |
| 1224 |
|
else SepRadio->SetValue(true); |
| 1225 |
|
|
| 1287 |
|
{ |
| 1288 |
|
// Bitmap retrieval |
| 1289 |
|
////@begin MainWindow bitmap retrieval |
| 1290 |
< |
wxUnusedVar(name); |
| 1291 |
< |
if (name == _T("redo.xpm")) |
| 1292 |
< |
{ |
| 1293 |
< |
wxBitmap bitmap(redo_xpm); |
| 1294 |
< |
return bitmap; |
| 1295 |
< |
} |
| 1296 |
< |
else if (name == _T("fileopen.xpm")) |
| 1297 |
< |
{ |
| 1298 |
< |
wxBitmap bitmap( fileopen_xpm); |
| 1299 |
< |
return bitmap; |
| 1300 |
< |
} |
| 1301 |
< |
else if (name == _T("filesaveas.xpm")) |
| 1302 |
< |
{ |
| 1303 |
< |
wxBitmap bitmap( filesaveas_xpm); |
| 1304 |
< |
return bitmap; |
| 1305 |
< |
} |
| 1306 |
< |
else if (name == _T("quit.xpm")) |
| 1307 |
< |
{ |
| 1308 |
< |
wxBitmap bitmap( quit_xpm); |
| 1309 |
< |
return bitmap; |
| 1310 |
< |
} |
| 1311 |
< |
return wxNullBitmap; |
| 1290 |
> |
wxUnusedVar(name); |
| 1291 |
> |
if (name == _T("undo.xpm")) |
| 1292 |
> |
{ |
| 1293 |
> |
wxBitmap bitmap( undo_xpm); |
| 1294 |
> |
return bitmap; |
| 1295 |
> |
} |
| 1296 |
> |
else if (name == _T("fileopen.xpm")) |
| 1297 |
> |
{ |
| 1298 |
> |
wxBitmap bitmap( fileopen_xpm); |
| 1299 |
> |
return bitmap; |
| 1300 |
> |
} |
| 1301 |
> |
else if (name == _T("filesaveas.xpm")) |
| 1302 |
> |
{ |
| 1303 |
> |
wxBitmap bitmap( filesaveas_xpm); |
| 1304 |
> |
return bitmap; |
| 1305 |
> |
} |
| 1306 |
> |
else if (name == _T("quit.xpm")) |
| 1307 |
> |
{ |
| 1308 |
> |
wxBitmap bitmap( quit_xpm); |
| 1309 |
> |
return bitmap; |
| 1310 |
> |
} |
| 1311 |
> |
return wxNullBitmap; |
| 1312 |
|
////@end MainWindow bitmap retrieval |
| 1313 |
|
} |
| 1314 |
|
|
| 1321 |
|
|
| 1322 |
|
// Icon retrieval |
| 1323 |
|
////@begin MainWindow icon retrieval |
| 1324 |
< |
wxUnusedVar(name); |
| 1325 |
< |
if (name == _T("oni_special.ico")) |
| 1326 |
< |
{ |
| 1327 |
< |
// wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO); |
| 1328 |
< |
// return icon; |
| 1329 |
< |
} |
| 1330 |
< |
return wxNullIcon; |
| 1324 |
> |
wxUnusedVar(name); |
| 1325 |
> |
if (name == _T("aelogosmall.png")) |
| 1326 |
> |
{ |
| 1327 |
> |
wxIcon icon(aelogosmall_xpm); |
| 1328 |
> |
return icon; |
| 1329 |
> |
} |
| 1330 |
> |
return wxNullIcon; |
| 1331 |
|
////@end MainWindow icon retrieval |
| 1332 |
|
} |
| 1333 |
|
|
| 1377 |
|
{ |
| 1378 |
|
if (!event.GetInt() ) { |
| 1379 |
|
OptionsPanel->Hide(); |
| 1380 |
+ |
|
| 1381 |
|
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());} |
| 1382 |
|
else { |
| 1383 |
|
// Uncomment this when we release, it gets annoying if you are testing globalization a lot ;) |
| 1385 |
|
"AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); |
| 1386 |
|
YesNoDialog->ShowModal(); |
| 1387 |
|
OptionsPanel->Show(); |
| 1388 |
< |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+2); |
| 1388 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1); |
| 1389 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1); |
| 1390 |
|
} |
| 1391 |
|
} |
| 1392 |
|
|
| 1414 |
|
TheInstallButton->Disable(); |
| 1415 |
|
recompileAll(thePackages); |
| 1416 |
|
TheInstallButton->Enable(); |
| 1417 |
+ |
|
| 1418 |
|
} |
| 1419 |
|
|
| 1420 |
|
vector<string> thePackages; |
| 1421 |
|
}; |
| 1422 |
|
|
| 1423 |
+ |
void globalize2(void) { |
| 1424 |
+ |
TheInstallButton->Disable(); |
| 1425 |
+ |
globalizeData(); |
| 1426 |
+ |
TheInstallButton->Enable(); |
| 1427 |
+ |
} |
| 1428 |
+ |
|
| 1429 |
+ |
|
| 1430 |
+ |
|
| 1431 |
|
void MainWindow::OnInstallButtonClick( wxCommandEvent& event ) |
| 1432 |
|
{ |
| 1433 |
|
|
| 1434 |
|
vector<string> localPackages; |
| 1435 |
< |
localPackages.push_back("Globalize"); |
| 1435 |
> |
localPackages.push_back("00000Globalize"); |
| 1436 |
|
for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); |
| 1437 |
|
if ( !localPackages.empty() ) { |
| 1438 |
< |
|
| 1438 |
> |
sort(localPackages.begin(), localPackages.end()); |
| 1439 |
> |
localPackages[0] = "Globalize"; |
| 1440 |
|
//MainWindow::MainWindow().Hide(); |
| 1441 |
|
// boost::thread thrd2(recompileAll(localPackages) ); |
| 1442 |
|
//MainWindow::MainWindow().Show(); |
| 1470 |
|
|
| 1471 |
|
void setProgressBar( int i ) { |
| 1472 |
|
//TheProgressBar->SetValue( |
| 1473 |
+ |
#ifdef WIN32 |
| 1474 |
+ |
|
| 1475 |
+ |
|
| 1476 |
|
|
| 1477 |
+ |
if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3))) |
| 1478 |
+ |
{ |
| 1479 |
+ |
|
| 1480 |
+ |
pTaskbarList3->SetProgressValue(Handle,i, 1000); |
| 1481 |
+ |
if ( i == 0 ) { |
| 1482 |
+ |
|
| 1483 |
+ |
pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS); |
| 1484 |
+ |
} |
| 1485 |
+ |
} |
| 1486 |
+ |
|
| 1487 |
+ |
|
| 1488 |
+ |
#endif |
| 1489 |
|
TheProgressBar->SetValue(i); |
| 1490 |
|
|
| 1491 |
|
} |
| 1498 |
|
void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event ) |
| 1499 |
|
{ |
| 1500 |
|
////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. |
| 1501 |
< |
// Before editing this code, remove the block markers. |
| 1502 |
< |
event.Skip(); |
| 1501 |
> |
// Before editing this code, remove the block markers. |
| 1502 |
> |
event.Skip(); |
| 1503 |
|
////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. |
| 1504 |
|
} |
| 1505 |
|
|
| 1511 |
|
void MainWindow::OnAboutClick( wxCommandEvent& event ) |
| 1512 |
|
{ |
| 1513 |
|
////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. |
| 1514 |
< |
// Before editing this code, remove the block markers. |
| 1515 |
< |
About* window = new About(this); |
| 1516 |
< |
int returnValue = window->ShowModal(); |
| 1517 |
< |
window->Destroy(); |
| 1514 |
> |
// Before editing this code, remove the block markers. |
| 1515 |
> |
About* window = new About(this); |
| 1516 |
> |
int returnValue = window->ShowModal(); |
| 1517 |
> |
window->Destroy(); |
| 1518 |
|
////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. |
| 1519 |
|
} |
| 1520 |
|
|
| 1543 |
|
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton |
| 1544 |
|
*/ |
| 1545 |
|
|
| 1418 |
– |
void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event ) |
| 1419 |
– |
{ |
| 1420 |
– |
splitInstances = SPLIT; |
| 1421 |
– |
|
| 1422 |
– |
} |
| 1423 |
– |
|
| 1424 |
– |
|
| 1546 |
|
/* |
| 1547 |
|
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton |
| 1548 |
|
*/ |
| 1666 |
|
|
| 1667 |
|
void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event ) |
| 1668 |
|
{ |
| 1669 |
< |
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); |
| 1669 |
> |
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); |
| 1670 |
|
|
| 1671 |
|
if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no... |
| 1672 |
|
|
| 1704 |
|
////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow. |
| 1705 |
|
}*/ |
| 1706 |
|
|
| 1707 |
+ |
|
| 1708 |
+ |
/* |
| 1709 |
+ |
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton |
| 1710 |
+ |
*/ |
| 1711 |
+ |
|
| 1712 |
+ |
void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event ) |
| 1713 |
+ |
{ |
| 1714 |
+ |
splitInstances = SPLIT; |
| 1715 |
+ |
} |
| 1716 |
+ |
|