ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
ENDCLASS(XonoticPlayerSettingsTab)
entity makeXonoticPlayerSettingsTab();
-void HUDSetup_Start(entity me, entity btn);
#endif
#ifdef IMPLEMENTATION
-void HUDSetup_Check_Gamestatus(entity me, entity btn)
-{
- if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, ask the player if they want to start one anyway
- {
- DialogOpenButton_Click(me, main.hudconfirmDialog);
- }
- else // already in a match, lets just cut to the point and open up the hud editor directly
- {
- HUDSetup_Start(me, btn);
- }
-}
entity makeXonoticPlayerSettingsTab()
{
entity me;
me.TR(me);
me.TDempty(me, 0.5);
me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
- e.onClick = HUDSetup_Check_Gamestatus;
- e.onClickEntity = me;
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.hudDialog;
// TODO: show hud config name with text here
me.gotoRC(me, me.rows - 1, 0);
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)
{
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);
-
- i = spawnXonoticSandboxToolsDialog();
- 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);
i = spawnXonoticHUDCenterprintDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
- me.hudconfirmDialog = i = spawnXonoticHUDConfirmDialog();
+
+
+ // 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.advancedDialog = i = spawnXonoticAdvancedDialog();
+
+ me.cvarsDialog = i = spawnXonoticCvarsDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
- me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
+
+
+ // 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.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
+
+ me.advancedDialog = i = spawnXonoticAdvancedDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
- me.winnerDialog = i = spawnXonoticWinnerDialog();
+ me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
- me.weaponsDialog = i = spawnXonoticWeaponsDialog();
+ // 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.serverInfoDialog = i = spawnXonoticServerInfoDialog();
+ me.hudDialog = i = spawnXonoticHUDDialog();
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+ me.hudconfirmDialog = i = spawnXonoticHUDConfirmDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
- me.cvarsDialog = i = spawnXonoticCvarsDialog();
+ me.modelDialog = i = spawnXonoticModelDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
+
me.viewDialog = i = spawnXonoticViewDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
- me.modelDialog = i = spawnXonoticModelDialog();
+ me.weaponsDialog = i = spawnXonoticWeaponsDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
- me.crosshairDialog = i = spawnXonoticCrosshairDialog();
+ // 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"))