2 CLASS(MainWindow) EXTENDS(ModalController)
3 METHOD(MainWindow, configureMainWindow, void(entity))
4 ATTRIB(MainWindow, mutatorsDialog, entity, NULL)
5 ATTRIB(MainWindow, weaponsDialog, entity, NULL)
6 ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
7 ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
8 ATTRIB(MainWindow, winnerDialog, entity, NULL)
9 ATTRIB(MainWindow, radarDialog, entity, NULL)
10 ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
11 ATTRIB(MainWindow, cvarsDialog, entity, NULL)
12 ATTRIB(MainWindow, mainNexposee, entity, NULL)
13 ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
19 void DemoButton_Click(entity me, entity other)
21 if(me.text == "Do not press this button again!")
22 DialogOpenButton_Click(me, other);
24 me.setText(me, "Do not press this button again!");
27 void configureMainWindowMainWindow(entity me)
31 i = spawnNexuizTeamSelectDialog();
33 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
35 me.mutatorsDialog = i = spawnNexuizMutatorsDialog();
37 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
39 me.mapInfoDialog = i = spawnNexuizMapInfoDialog();
41 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
43 me.userbindEditDialog = i = spawnNexuizUserbindEditDialog();
45 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
47 me.winnerDialog = i = spawnNexuizWinnerDialog();
49 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
51 me.weaponsDialog = i = spawnNexuizWeaponsDialog();
53 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
55 me.radarDialog = i = spawnNexuizRadarDialog();
57 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
59 me.serverInfoDialog = i = spawnNexuizServerInfoDialog();
61 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
63 me.cvarsDialog = i = spawnNexuizCvarsDialog();
65 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
67 me.mainNexposee = n = spawnNexuizNexposee();
69 if(checkextension("DP_GECKO_SUPPORT"))
71 i = spawnNexuizNewsDialog();
73 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
74 n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
77 i = spawnNexuizSingleplayerDialog();
79 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
80 n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
82 i = spawnNexuizMultiplayerDialog();
84 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
85 n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
87 i = spawnNexuizSettingsDialog();
89 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
90 n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
92 i = spawnNexuizCreditsDialog();
94 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
95 n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
96 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
98 i = spawnNexuizQuitDialog();
100 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
101 n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
102 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
103 me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
104 me.moveItemAfter(me, n, NULL);
106 me.initializeDialog(me, n);
110 // click. The C-word so you can grep for it.