]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
radiant/q3map2: add option to disable engine path and home path
[xonotic/netradiant.git] / radiant / mainframe.cpp
index 662f6332cef5e83f1868c042a048ebca1dafac0b..2eed7bff0c9f6a935cd146ee0410680b0f210a04 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] ) );