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"
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
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
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
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
#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"
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);
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); }
}
}
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
+++ /dev/null
-#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
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);
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
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);