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, waypointDialog, 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 = spawnXonoticTeamSelectDialog();
34 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
36 i = spawnXonoticHUDExitDialog();
38 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
40 me.advancedDialog = i = spawnXonoticAdvancedDialog();
42 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
44 me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
46 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
48 me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
50 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
52 me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
54 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
56 me.winnerDialog = i = spawnXonoticWinnerDialog();
58 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
60 me.weaponsDialog = i = spawnXonoticWeaponsDialog();
62 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
64 me.waypointDialog = i = spawnXonoticWaypointDialog();
66 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
68 me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
70 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
72 me.cvarsDialog = i = spawnXonoticCvarsDialog();
74 me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
76 me.mainNexposee = n = spawnXonoticNexposee();
78 if(checkextension("DP_GECKO_SUPPORT"))
80 i = spawnXonoticNewsDialog();
82 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
83 n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
86 i = spawnXonoticSingleplayerDialog();
88 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
89 n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
91 i = spawnXonoticMultiplayerDialog();
93 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
94 n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
96 i = spawnXonoticSettingsDialog();
98 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
99 n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
101 i = spawnXonoticCreditsDialog();
102 i.configureDialog(i);
103 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
104 n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
105 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
107 i = spawnXonoticQuitDialog();
108 i.configureDialog(i);
109 n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
110 n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
111 n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
112 me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
113 me.moveItemAfter(me, n, NULL);
115 me.initializeDialog(me, n);
119 /* Click. The c-word is here so you can grep for it :-) */