]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Commit this shit... gonna fix it tomorrow.
authorSamual Lenks <samual@xonotic.org>
Fri, 20 Dec 2013 07:26:25 +0000 (02:26 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 20 Dec 2013 07:26:25 +0000 (02:26 -0500)
defaultXonotic.cfg
effects-high.cfg
effects-low.cfg
effects-med.cfg
effects-normal.cfg
qcsrc/menu/classes.c
qcsrc/menu/xonotic/demolist.c
qcsrc/menu/xonotic/dialog_multiplayer_media_demo.c
qcsrc/menu/xonotic/dialog_multiplayer_media_demo_democonfirm.c [deleted file]
qcsrc/menu/xonotic/dialog_settings_effects.c
qcsrc/menu/xonotic/mainwindow.c

index e0b7b4662eea0272e667979e104eb99dee018121..009cff570b66ce7be6f0f0606a5000abcad72b8e 100644 (file)
@@ -1269,7 +1269,7 @@ set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
 
 set cl_loddistance1 1024
 set cl_loddistance2 3072
-seta cl_playerdetailreduction 1        "the higher, the less detailed player models are displayed (LOD)"
+seta cl_playerdetailreduction 2        "the higher, the less detailed player models are displayed (LOD)"
 seta cl_modeldetailreduction 1 "the higher, the less detailed certain map models are displayed (LOD)"
 
 set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
index b0178fa8f714052b047b73f98428069d9ab38a14..d28b69b43ff3be42f55541e6434bb5099144c5b5 100644 (file)
@@ -5,7 +5,7 @@ cl_particles 1
 cl_particles_quality 1.0
 cl_damageeffect 1
 cl_spawn_point_particles 1
-cl_playerdetailreduction 0.5
+cl_playerdetailreduction 1
 gl_flashblend 0
 gl_picmip -1
 mod_q3bsp_nolightmaps 0
index dd0b607098886a86e5fcacfa776d5a0de089474b..3af46190f685ffc437b5217f53f5dab89f0204ff 100644 (file)
@@ -5,7 +5,7 @@ cl_particles 1
 cl_particles_quality 0.4
 cl_damageeffect 0
 cl_spawn_point_particles 0
-cl_playerdetailreduction 2
+cl_playerdetailreduction 4
 gl_flashblend 1
 gl_picmip 1
 mod_q3bsp_nolightmaps 1
index bc08dadc1cdac8c6f170c5ddb07b62ab9ddb50d1..53034c19b9186f503e5cc690254da9962827d865 100644 (file)
@@ -5,7 +5,7 @@ cl_particles 1
 cl_particles_quality 0.8
 cl_damageeffect 0
 cl_spawn_point_particles 0
-cl_playerdetailreduction 1
+cl_playerdetailreduction 3
 gl_flashblend 0
 gl_picmip 0
 mod_q3bsp_nolightmaps 0
index 06b62edf2ec493480138ee905645164b7ee82374..d7af2166c1c7d1abdbba3cb58082f2b05b7788c2 100644 (file)
@@ -5,7 +5,7 @@ cl_particles 1
 cl_particles_quality 1.0
 cl_damageeffect 1
 cl_spawn_point_particles 1
-cl_playerdetailreduction 1
+cl_playerdetailreduction 2
 gl_flashblend 0
 gl_picmip 0
 mod_q3bsp_nolightmaps 0
index 4658d08bc0c9d18ba7c96c9054345e896a9eeac3..5a9e516c8e9ed32f424244ed6e04a87be274f9c4 100644 (file)
@@ -87,6 +87,8 @@
 #include "xonotic/weaponslist.c"
 #include "xonotic/dialog_multiplayer_media.c"
 #include "xonotic/dialog_multiplayer_media_demo.c"
+#include "xonotic/dialog_multiplayer_media_demo_startconfirm.c"
+#include "xonotic/dialog_multiplayer_media_demo_timeconfirm.c"
 #include "xonotic/demolist.c"
 #include "xonotic/screenshotimage.c"
 #include "xonotic/dialog_multiplayer_media_screenshot.c"
 #include "xonotic/dialog_hudpanel_centerprint.c"
 #include "xonotic/slider_picmip.c"
 #include "xonotic/dialog_settings_game_notification.c"
-#include "xonotic/dialog_multiplayer_media_demo_democonfirm.c"
 #include "xonotic/slider_particles.c"
index 23d21b18a25c98514141844b31ec4826e11d5dc6..7ce54d32c07713720ca326c5386fff1c6bd7c8c1 100644 (file)
@@ -25,6 +25,7 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
        ATTRIB(XonoticDemoList, filterString, string, string_null)
 ENDCLASS(XonoticDemoList)
 
+entity demolist; // for reference elsewhere
 entity makeXonoticDemoList();
 void StartDemo_Click(entity btn, entity me);
 void TimeDemo_Click(entity btn, entity me);
index b1256b2ab1c65dc2f186291c44ad2d172159750b..47a9882782eabaad43565bdac9dbee7c8056ab6d 100644 (file)
@@ -6,23 +6,29 @@ CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticDemoBrowserTab, rows, float, 21)
        ATTRIB(XonoticDemoBrowserTab, columns, float, 6.5)
        ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBrowser")
+       ATTRIB(XonoticDemoBrowserTab, democlicktype, float, 0)
 ENDCLASS(XonoticDemoBrowserTab)
 entity makeXonoticDemoBrowserTab();
-void Demo_Confirm(entity me, entity btn);
+const float DMO_PLAY = 1;
+const float DMO_TIME = 2;
 #endif
 
 #ifdef IMPLEMENTATION
-void DemoConfirm_Check_Gamestatus(entity me, entity btn)
+void DemoConfirm_Check_Gamestatus(entity btn, entity me)
 {
        if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, lets watch the demo
        {
-               //TimeDemo_Click;
-               //StartDemo_Click;
-               return;
+               if(btn.democlicktype == DMO_PLAY)
+                       { StartDemo_Click(btn, demolist); }
+               else if(btn.democlicktype == DMO_TIME)
+                       { TimeDemo_Click(btn, demolist); }
        }
        else // already in a match, player has to confirm
        {
-               Demo_Confirm(me, btn);
+               if(btn.democlicktype == DMO_PLAY)
+                       { DialogOpenButton_Click(btn, main.demostartconfirmDialog); }
+               else if(btn.democlicktype == DMO_TIME)
+                       { DialogOpenButton_Click(btn, main.demotimeconfirmDialog); }
        }
 }
 
@@ -36,31 +42,32 @@ entity makeXonoticDemoBrowserTab()
 void XonoticDemoBrowserTab_fill(entity me)
 {
        entity e;
-       entity dlist = makeXonoticDemoList();
-       
+       demolist = makeXonoticDemoList();
+
        me.TR(me);
                me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Filter:")));
                me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
                        e.onChange = DemoList_Filter_Change;
-                       e.onChangeEntity = dlist;
-                       dlist.controlledTextbox = e;
+                       e.onChangeEntity = demolist;
+                       demolist.controlledTextbox = e;
 
        me.gotoRC(me, 0, 3.7);
                me.TD(me, 1, 1.5, e = makeXonoticCheckBox(0, "cl_autodemo", _("Auto record demos")));
                me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
                        //e.onClick = DemoList_Filter_Change;
-                       //e.onClickEntity = dlist;
-
+                       //e.onClickEntity = demolist;
 
        me.gotoRC(me, 1.5, 0);
-               me.TD(me, me.rows - 2.5, me.columns, dlist);
+               me.TD(me, me.rows - 2.5, me.columns, demolist);
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0'));
+                       e.democlicktype = DMO_TIME;
                        e.onClick = DemoConfirm_Check_Gamestatus;
-                       e.onClickEntity = dlist;
+                       e.onClickEntity = me; // demolist is global anyway
                me.TD(me, 1, me.columns / 2, e = makeXonoticButton(ZCTX(_("DEMO^Play")), '0 0 0'));
+                       e.democlicktype = DMO_PLAY;
                        e.onClick = DemoConfirm_Check_Gamestatus;
-                       e.onClickEntity = dlist;
+                       e.onClickEntity = me; // demolist is global anyway
 }
 #endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_democonfirm.c b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_democonfirm.c
deleted file mode 100644 (file)
index c51e065..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifdef INTERFACE
-CLASS(XonoticDemoConfirmDialog) EXTENDS(XonoticDialog)
-       METHOD(XonoticDemoConfirmDialog, fill, void(entity))
-       ATTRIB(XonoticDemoConfirmDialog, title, string, _("Disconnect"))
-       ATTRIB(XonoticDemoConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
-       ATTRIB(XonoticDemoConfirmDialog, intendedWidth, float, 0.5)
-       ATTRIB(XonoticDemoConfirmDialog, rows, float, 4)
-       ATTRIB(XonoticDemoConfirmDialog, columns, float, 2)
-ENDCLASS(XonoticDemoConfirmDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void Demo_Confirm(entity me, entity btn)
-{
-       if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
-               //me.onClick = TimeDemo_Click;
-               me.onClick = StartDemo_Click;
-       else
-               localcmd("togglemenu 0\n");
-}
-
-void XonoticDemoConfirmDialog_fill(entity me)
-{
-       entity e;
-
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Playing a demo will disconnect you from the current match.")));
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you really wish to disconnect now?")));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^Yes")), '1 0 0'));
-                       e.onClick = Demo_Confirm;
-                       e.onClickEntity = me;
-               me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("DMCNFRM^No")), '0 1 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-#endif
index c6c2ffcea5f839fea3b815dfe41ae318de824831..44e769f9fa973af467598477f0deaeb45b726b02 100644 (file)
@@ -59,7 +59,13 @@ void XonoticEffectsSettingsTab_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player detail:")));
-               me.TD(me, 1, 2, e = makeXonoticSlider(4, 0, -0.1, "cl_playerdetailreduction"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_playerdetailreduction"));
+                       e.addValue(e, ZCTX(_("PDET^Low")), "4");
+                       e.addValue(e, ZCTX(_("PDET^Medium")), "3");
+                       e.addValue(e, ZCTX(_("PDET^Normal")), "2");
+                       e.addValue(e, ZCTX(_("PDET^Good")), "1");
+                       e.addValue(e, ZCTX(_("PDET^Best")), "0");
+                       e.configureXonoticTextSliderValues(e);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
                        setDependent(e, "r_showsurfaces", 0, 0);
index 213dabf02231779475f9b4339634c49ea3297587..92aa2b0c6bc6c2829e7edb09663df77865afea27 100644 (file)
@@ -18,7 +18,8 @@ CLASS(MainWindow) EXTENDS(ModalController)
        ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
        ATTRIB(MainWindow, dialogToShow, entity, NULL)
        ATTRIB(MainWindow, notificationDialog, entity, NULL)
-       ATTRIB(MainWindow, democonfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, demostartconfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, demotimeconfirmDialog, entity, NULL)
 ENDCLASS(MainWindow)
 #endif
 
@@ -151,11 +152,15 @@ void MainWindow_configureMainWindow(entity me)
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        
-       me.democonfirmDialog = i = spawnXonoticDemoConfirmDialog();
+       me.demostartconfirmDialog = i = spawnXonoticDemoStartConfirmDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+       me.demotimeconfirmDialog = i = spawnXonoticDemoTimeConfirmDialog();
+       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);