X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fmainwindow.c;h=2adb9343e491b7f70f1355ad14865463753b5857;hb=4d0d5a158549f02cd0f38e11cf37cca259a444b3;hp=55d496047138cf23ec68b55251db14e8658d17d9;hpb=9c40c25078426ed90e985c402c648fea3e3a8832;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/mainwindow.c b/qcsrc/menu/xonotic/mainwindow.c index 55d496047..2adb9343e 100644 --- a/qcsrc/menu/xonotic/mainwindow.c +++ b/qcsrc/menu/xonotic/mainwindow.c @@ -9,9 +9,13 @@ CLASS(MainWindow) EXTENDS(ModalController) ATTRIB(MainWindow, mapInfoDialog, entity, NULL) ATTRIB(MainWindow, userbindEditDialog, entity, NULL) ATTRIB(MainWindow, winnerDialog, entity, NULL) - ATTRIB(MainWindow, waypointDialog, entity, NULL) ATTRIB(MainWindow, serverInfoDialog, entity, NULL) ATTRIB(MainWindow, cvarsDialog, 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, mainNexposee, entity, NULL) ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND) ATTRIB(MainWindow, dialogToShow, entity, NULL) @@ -42,14 +46,13 @@ void MainWindow_configureMainWindow(entity me) { entity n, i; + // dialog run upon startup me.firstRunDialog = i = spawnXonoticFirstRunDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - - i = spawnXonoticTeamSelectDialog(); - i.configureDialog(i); - me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + // hud_configure dialogs i = spawnXonoticHUDExitDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); @@ -121,7 +124,35 @@ void MainWindow_configureMainWindow(entity me) i = spawnXonoticHUDCenterprintDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - + + + // dialogs used by settings + me.userbindEditDialog = i = spawnXonoticUserbindEditDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + me.cvarsDialog = i = spawnXonoticCvarsDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + + // dialog used by singleplayer + me.winnerDialog = i = spawnXonoticWinnerDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + + // dialog used by multiplayer/join + me.serverInfoDialog = i = spawnXonoticServerInfoDialog(); + 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); @@ -129,35 +160,47 @@ void MainWindow_configureMainWindow(entity me) me.mutatorsDialog = i = spawnXonoticMutatorsDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + - me.mapInfoDialog = i = spawnXonoticMapInfoDialog(); + // 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.userbindEditDialog = i = spawnXonoticUserbindEditDialog(); + + me.hudDialog = i = spawnXonoticHUDDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - me.winnerDialog = i = spawnXonoticWinnerDialog(); + me.hudconfirmDialog = i = spawnXonoticHUDConfirmDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - - me.weaponsDialog = i = spawnXonoticWeaponsDialog(); + + me.modelDialog = i = spawnXonoticModelDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - - me.waypointDialog = i = spawnXonoticWaypointDialog(); + + me.viewDialog = i = spawnXonoticViewDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - me.serverInfoDialog = i = spawnXonoticServerInfoDialog(); + me.weaponsDialog = i = spawnXonoticWeaponsDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); - me.cvarsDialog = i = spawnXonoticCvarsDialog(); + + // mutator dialogs + i = spawnXonoticSandboxToolsDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + // miscellaneous dialogs + i = spawnXonoticTeamSelectDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + + // main dialogs/windows me.mainNexposee = n = spawnXonoticNexposee(); /* if(checkextension("DP_GECKO_SUPPORT")) @@ -194,6 +237,7 @@ void MainWindow_configureMainWindow(entity me) n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y); n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight)); + me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z); me.moveItemAfter(me, n, NULL);