]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/mainwindow.c
Get rid of hardcoded "Player" string for checking whether the name needs changing...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / mainwindow.c
index f7a4564ac2d7c8abd4f6ac5eb78151f3982bb77e..dcc4a8a81729e440fbf042ddc448d4f16a83cbb2 100644 (file)
@@ -11,16 +11,15 @@ CLASS(MainWindow) EXTENDS(ModalController)
        ATTRIB(MainWindow, winnerDialog, entity, NULL)
        ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
        ATTRIB(MainWindow, cvarsDialog, entity, NULL)
-       ATTRIB(MainWindow, screenshotViewerDialog, entity, NULL)
        ATTRIB(MainWindow, viewDialog, entity, NULL)
        ATTRIB(MainWindow, modelDialog, entity, NULL)
+       ATTRIB(MainWindow, crosshairDialog, entity, NULL)
        ATTRIB(MainWindow, hudDialog, entity, NULL)
        ATTRIB(MainWindow, hudconfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, languageWarningDialog, entity, NULL)
        ATTRIB(MainWindow, mainNexposee, entity, NULL)
        ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
        ATTRIB(MainWindow, dialogToShow, entity, NULL)
-       ATTRIB(MainWindow, notificationDialog, entity, NULL)
-       ATTRIB(MainWindow, democonfirmDialog, entity, NULL)
 ENDCLASS(MainWindow)
 #endif
 
@@ -118,16 +117,16 @@ void MainWindow_configureMainWindow(entity me)
        i = spawnXonoticHUDInfoMessagesDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDPhysicsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       me.screenshotViewerDialog = i = spawnXonoticScreenshotViewerDialog();
+
+       i = spawnXonoticHUDCenterprintDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
-       i = spawnXonoticHUDCenterprintDialog();
+       i = spawnXonoticHUDBuffsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
@@ -141,6 +140,10 @@ void MainWindow_configureMainWindow(entity me)
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
+       me.languageWarningDialog = i = spawnXonoticLanguageWarningDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
 
        // dialog used by singleplayer
        me.winnerDialog = i = spawnXonoticWinnerDialog();
@@ -152,22 +155,27 @@ void MainWindow_configureMainWindow(entity me)
        me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       me.democonfirmDialog = i = spawnXonoticDemoConfirmDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // dialogs used by multiplayer/create
        me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
+       me.advancedDialog = i = spawnXonoticAdvancedDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
        me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
-       // dialogs used by multiplayer/player setup     
+
+       // dialogs used by multiplayer/player setup
+       me.crosshairDialog = i = spawnXonoticCrosshairDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
        me.hudDialog = i = spawnXonoticHUDDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
@@ -180,11 +188,11 @@ void MainWindow_configureMainWindow(entity me)
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
-       me.weaponsDialog = i = spawnXonoticWeaponsDialog();
+       me.viewDialog = i = spawnXonoticViewDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
-       me.notificationDialog = i = spawnXonoticNotificationDialog();
+       me.weaponsDialog = i = spawnXonoticWeaponsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
@@ -200,6 +208,10 @@ void MainWindow_configureMainWindow(entity me)
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
+       i = spawnXonoticMonsterToolsDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS);
+
 
        // main dialogs/windows
        me.mainNexposee = n = spawnXonoticNexposee();
@@ -244,7 +256,7 @@ void MainWindow_configureMainWindow(entity me)
 
        me.initializeDialog(me, n);
 
-       if(cvar_string("_cl_name") == "Player")
+       if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
                me.dialogToShow = me.firstRunDialog;
 }
 #endif