2 CLASS(MainWindow) EXTENDS(ModalController)
3 METHOD(MainWindow, configureMainWindow, void(entity))
4 ATTRIB(MainWindow, advancedDialog, entity, NULL)
5 ATTRIB(MainWindow, mutatorsDialog, entity, NULL)
6 ATTRIB(MainWindow, weaponsDialog, entity, NULL)
7 ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
8 ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
9 ATTRIB(MainWindow, winnerDialog, entity, NULL)
10 ATTRIB(MainWindow, radarDialog, entity, NULL)
11 ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
12 ATTRIB(MainWindow, cvarsDialog, entity, NULL)
13 ATTRIB(MainWindow, mainNexposee, entity, NULL)
14 ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
20 void DemoButton_Click(entity me, entity other)
22 if(me.text == "Do not press this button again!")
23 DialogOpenButton_Click(me, other);
25 me.setText(me, "Do not press this button again!");
28 void configureMainWindowMainWindow(entity me)
32 i = spawnNexuizTeamSelectDialog();
34 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
36 me.advancedDialog = i = spawnNexuizAdvancedDialog();
38 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
40 me.mutatorsDialog = i = spawnNexuizMutatorsDialog();
42 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
44 me.mapInfoDialog = i = spawnNexuizMapInfoDialog();
46 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
48 me.userbindEditDialog = i = spawnNexuizUserbindEditDialog();
50 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
52 me.winnerDialog = i = spawnNexuizWinnerDialog();
54 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
56 me.weaponsDialog = i = spawnNexuizWeaponsDialog();
58 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
60 me.radarDialog = i = spawnNexuizRadarDialog();
62 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
64 me.serverInfoDialog = i = spawnNexuizServerInfoDialog();
66 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
68 me.cvarsDialog = i = spawnNexuizCvarsDialog();
70 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
72 me.mainNexposee = n = spawnNexuizNexposee();
74 if(checkextension("DP_GECKO_SUPPORT"))
76 i = spawnNexuizNewsDialog();
78 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
79 n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
82 i = spawnNexuizSingleplayerDialog();
84 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
85 n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
87 i = spawnNexuizMultiplayerDialog();
89 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
90 n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
92 i = spawnNexuizSettingsDialog();
94 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
95 n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
97 i = spawnNexuizCreditsDialog();
99 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
100 n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
101 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
103 i = spawnNexuizQuitDialog();
104 i.configureDialog(i);
105 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
106 n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
107 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
108 me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
109 me.moveItemAfter(me, n, NULL);
111 me.initializeDialog(me, n);
115 /* Click. The c-word is here so you can grep for it :-) */