adding a 'factory reset' button to the menu to reset all settings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / mainwindow.c
index 5c58025..e0dd17e 100644 (file)
@@ -20,6 +20,7 @@ CLASS(MainWindow) EXTENDS(ModalController)
        ATTRIB(MainWindow, mainNexposee, entity, NULL)
        ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
        ATTRIB(MainWindow, dialogToShow, entity, NULL)
+       ATTRIB(MainWindow, resetDialog, entity, NULL)
 ENDCLASS(MainWindow)
 #endif
 
@@ -139,6 +140,10 @@ void MainWindow_configureMainWindow(entity me)
        me.cvarsDialog = i = spawnXonoticCvarsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       me.resetDialog = i = spawnXonoticResetDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
        me.languageWarningDialog = i = spawnXonoticLanguageWarningDialog();
        i.configureDialog(i);