radiant/q3map2: add option to disable engine path and home path
[xonotic/netradiant.git] / radiant / mainframe.cpp
index 662f633..2eed7bf 100644 (file)
@@ -523,9 +523,22 @@ struct PakPath4 {
        }
 };
 
+bool g_disableEnginePath = false;
+bool g_disableHomePath = false;
+
 void Paths_constructPreferences( PreferencesPage& page ){
        page.appendPathEntry( "Engine Path", true, make_property<EnginePath>(g_strEnginePath) );
 
+       page.appendCheckBox(
+               "", "Do not use Engine Path",
+               g_disableEnginePath
+               );
+
+       page.appendCheckBox(
+               "", "Do not use Home Path",
+               g_disableHomePath
+               );
+
        for ( int i = 0; i < g_pakPathCount; i++ ) {
                std::string label = "Pak Path " + std::to_string(i);
                switch (i) {
@@ -3440,6 +3453,9 @@ void MainFrame_Construct(){
 
        GlobalPreferenceSystem().registerPreference( "EnginePath", make_property_string( g_strEnginePath ) );
 
+       GlobalPreferenceSystem().registerPreference( "DisableEnginePath", make_property_string( g_disableEnginePath ) );
+       GlobalPreferenceSystem().registerPreference( "DisableHomePath", make_property_string( g_disableHomePath ) );
+
        for ( int i = 0; i < g_pakPathCount; i++ ) {
                std::string label = "PakPath" + std::to_string(i);
                GlobalPreferenceSystem().registerPreference( label.c_str(), make_property_string( g_strPakPath[i] ) );