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, fadedAlpha, float, SKINALPHA_BEHIND)
16 void DemoButton_Click(entity me, entity other)
18 if(me.text == "Do not press this button again!")
19 DialogOpenButton_Click(me, other);
21 me.setText(me, "Do not press this button again!");
24 void configureMainWindowMainWindow(entity me)
28 i = spawnNexuizTeamSelectDialog();
30 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
32 me.mutatorsDialog = i = spawnNexuizMutatorsDialog();
34 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
36 me.mapInfoDialog = i = spawnNexuizMapInfoDialog();
38 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
40 me.userbindEditDialog = i = spawnNexuizUserbindEditDialog();
42 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
44 me.winnerDialog = i = spawnNexuizWinnerDialog();
46 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
48 me.weaponsDialog = i = spawnNexuizWeaponsDialog();
50 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
52 me.radarDialog = i = spawnNexuizRadarDialog();
54 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
56 n = spawnNexuizNexposee();
58 if(checkextension("DP_GECKO_SUPPORT"))
60 i = spawnNexuizNewsDialog();
62 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
63 n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
66 i = spawnNexuizSingleplayerDialog();
68 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
69 n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
71 i = spawnNexuizMultiplayerDialog();
73 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
74 n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
76 i = spawnNexuizSettingsDialog();
78 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
79 n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
81 i = spawnNexuizCreditsDialog();
83 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
84 n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
85 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
87 i = spawnNexuizQuitDialog();
89 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
90 n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
91 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
92 me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
93 me.moveItemAfter(me, n, NULL);
95 me.initializeDialog(me, n);
99 // click. The C-word so you can grep for it.