]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Create hud settings dialog, and reorganize the setup in mainwindow.c with comments...
authorSamual <samual@xonotic.org>
Tue, 17 Jan 2012 04:26:13 +0000 (23:26 -0500)
committerSamual <samual@xonotic.org>
Tue, 17 Jan 2012 04:26:13 +0000 (23:26 -0500)
qcsrc/menu/classes.c
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_crosshair.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c
qcsrc/menu/xonotic/mainwindow.c

index 87769c806ec78f66e704e4ec7e2ccb22f94a67d7..41532801d83123ee1a32d83cc2dc79e302522ae2 100644 (file)
 #include "xonotic/dialog_singleplayer_winner.c"
 #include "xonotic/dialog_credits.c"
 #include "xonotic/credits.c"
+#include "xonotic/dialog_multiplayer_playersetup_crosshair.c"
+#include "xonotic/dialog_multiplayer_playersetup_hud.c"
 #include "xonotic/dialog_multiplayer_playersetup_hudconfirm.c"
 #include "xonotic/dialog_multiplayer_playersetup_model.c"
 #include "xonotic/dialog_multiplayer_playersetup_view.c"
-#include "xonotic/dialog_multiplayer_playersetup_crosshair.c"
 #include "xonotic/dialog_multiplayer_playersetup_weapons.c"
 #include "xonotic/weaponslist.c"
 #include "xonotic/dialog_multiplayer_demo.c"
index d9f32efd501e8ddfe5d72a7ce0e0dac667bf34fb..2c3ba80c575f807714795794574aa8e43490fd21 100644 (file)
@@ -67,6 +67,7 @@ SKINBEGIN
        SKINVECTOR(COLOR_DIALOG_VIEW, '1 0.7 0.7');
        SKINVECTOR(COLOR_DIALOG_MODEL, '1 0.7 0.7');
        SKINVECTOR(COLOR_DIALOG_CROSSHAIR, '1 0.7 0.7');
+       SKINVECTOR(COLOR_DIALOG_HUD, '1 0.7 0.7');
        SKINVECTOR(COLOR_DIALOG_SERVERINFO, '0.7 0.7 1');
        SKINVECTOR(COLOR_DIALOG_CVARS, '1 0 0');
        SKINVECTOR(COLOR_DIALOG_HUDCONFIRM, '1 0 0');
index 85060dca9a25146d0d0a6d51c045be3f68ee32ed..daf20fc1405d8c546c6a5d40cd29056804ab6503 100644 (file)
@@ -10,21 +10,9 @@ CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab)
        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;
@@ -179,8 +167,8 @@ void XonoticPlayerSettingsTab_fill(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);
index 0b10ff171f43f90d6d345472212f8b945a44d95c..7ca7d9622f9b561f61eb5006bbb4dfbd967f80e6 100644 (file)
@@ -18,7 +18,7 @@ void XonoticCrosshairDialog_showNotify(entity me)
 }
 string XonoticCrosshairDialog_toString(entity me)
 {
-       return "hi"; //me.weaponsList.toString(me.weaponsList);
+       return "hi"; // TODO: show status of crosshair dot and hittest and pickups and such here with text
 }
 void XonoticCrosshairDialog_fill(entity me)
 {
index a31d147945f0b98ca01ab0be70a2f9930743639b..71c71345444cc63b15d1039c8ff777e2a6463add 100644 (file)
@@ -18,7 +18,7 @@ void XonoticModelDialog_showNotify(entity me)
 }
 string XonoticModelDialog_toString(entity me)
 {
-       return "hi"; //me.weaponsList.toString(me.weaponsList);
+       return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
 }
 void XonoticModelDialog_fill(entity me)
 {
index 935aa74847ab48f1c63a791cdd32962dee7f8ba0..a5a49368e108de3016b85795feb57c9140be37d8 100644 (file)
@@ -18,7 +18,7 @@ void XonoticViewDialog_showNotify(entity me)
 }
 string XonoticViewDialog_toString(entity me)
 {
-       return "hi"; //me.weaponsList.toString(me.weaponsList);
+       return "hi"; // TODO: show fov and other settings with text here
 }
 void XonoticViewDialog_fill(entity me)
 {
index 291e02338b96d839ff19dbd651081387305cd068..2adb9343e491b7f70f1355ad14865463753b5857 100644 (file)
@@ -14,6 +14,7 @@ CLASS(MainWindow) EXTENDS(ModalController)
        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)
@@ -45,18 +46,13 @@ void MainWindow_configureMainWindow(entity me)
 {
        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);
@@ -128,55 +124,83 @@ void MainWindow_configureMainWindow(entity me)
        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"))