#include "xonotic/credits.c"
#include "xonotic/dialog_multiplayer_playersetup_weapons.c"
#include "xonotic/weaponslist.c"
-#include "xonotic/dialog_multiplayer_playersetup_radar.c"
+#include "xonotic/dialog_multiplayer_playersetup_waypoint.c"
#include "xonotic/dialog_multiplayer_demo.c"
#include "xonotic/demolist.c"
#include "xonotic/colorpicker.c"
ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
ENDCLASS(XonoticPlayerSettingsTab)
entity makeXonoticPlayerSettingsTab();
+
+void HUDSetup_Join_Click(entity me, entity btn);
#endif
#ifdef IMPLEMENTATION
+
entity makeXonoticPlayerSettingsTab()
{
entity me;
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.2, e = makeXonoticButton("Radar, HUD & Waypoints...", '0 0 0'));
+ me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints Setup", '0 0 0'));
e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.radarDialog;
+ e.onClickEntity = main.waypointDialog;
+ me.TDempty(me, 0.5);
+ me.TR(me);
+ me.TDempty(me, 0.4);
+ me.TD(me, 1, 2.2, e = makeXonoticButton("HUD Setup", '0 0 0'));
+ e.onClick = HUDSetup_Join_Click;
+ e.onClickEntity = me;
me.TDempty(me, 0.5);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
}
+void HUDSetup_Join_Click(entity me, entity btn)
+{
+ if(! (gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
+ {
+ localcmd("map hudtest", "\n");
+ /*float glob, i, n, fh;
+ string s;
+ glob = search_begin("maps/*.instantaction", TRUE, TRUE);
+ if(glob < 0)
+ return;
+ i = ceil(random() * search_getsize(glob)) - 1;
+ fh = fopen(search_getfilename(glob, i), FILE_READ);
+ search_end(glob);
+ if(fh < 0)
+ return;
+ while((s = fgets(fh)))
+ {
+ if(substring(s, 0, 4) == "set ")
+ s = substring(s, 4, strlen(s) - 4);
+ n = tokenize_console(s);
+ if(argv(0) == "bot_number")
+ cvar_set("bot_number", argv(1));
+ else if(argv(0) == "skill")
+ cvar_set("skill", argv(1));
+ else if(argv(0) == "timelimit")
+ cvar_set("timelimit_override", argv(1));
+ else if(argv(0) == "fraglimit")
+ cvar_set("fraglimit_override", argv(1));
+ else if(argv(0) == "changelevel")
+ {
+ fclose(fh);
+ localcmd("\nmenu_loadmap_prepare\n");
+ MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
+ MapInfo_LoadMap(argv(1));
+ cvar_set("lastlevel", "1");
+ return;
+ }
+ }
+ fclose(fh);*/
+ }
+ localcmd("_hud_configure 1", "\n");
+}
#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticRadarDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticRadarDialog, toString, string(entity))
- METHOD(XonoticRadarDialog, fill, void(entity))
- METHOD(XonoticRadarDialog, showNotify, void(entity))
- ATTRIB(XonoticRadarDialog, title, string, "Radar, HUD & Waypoints")
- ATTRIB(XonoticRadarDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
- ATTRIB(XonoticRadarDialog, intendedWidth, float, 0.7)
- ATTRIB(XonoticRadarDialog, rows, float, 19)
- ATTRIB(XonoticRadarDialog, columns, float, 4)
-ENDCLASS(XonoticRadarDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyXonoticRadarDialog(entity me)
-{
- loadAllCvars(me);
-}
-string toStringXonoticRadarDialog(entity me)
-{
- return "XXX";
-}
-void fillXonoticRadarDialog(entity me)
-{
- entity e, sl;
- me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Radar settings:"));
- me.TR(me);
- me.TDempty(me, 0.2);
- sl = makeXonoticSlider(0.20, 1, 0.01, "hud_radar_background_alpha");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1, 1, sl, "Background:"));
- me.TD(me, 1, 3, sl);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "HUD settings:"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticCheckBoxEx(100, 110, "viewsize", "Background:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_alpha_bg"));
- setDependent(e, "viewsize", 0, 100);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default red:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_r"));
- setDependent(e, "viewsize", 0, 100);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default green:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_g"));
- setDependent(e, "viewsize", 0, 100);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default blue:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_b"));
- setDependent(e, "viewsize", 0, 100);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Team color:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "sbar_color_bg_team"));
- setDependent(e, "viewsize", 0, 100);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint scale:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
- me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Show names:"));
- me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_shownames"));
- e.addValue(e, "Never", "0");
- e.addValue(e, "Teammates", "1");
- e.addValue(e, "All players", "2");
- e.configureXonoticTextSliderValues(e);
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-
-#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticWaypointDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticWaypointDialog, toString, string(entity))
+ METHOD(XonoticWaypointDialog, fill, void(entity))
+ METHOD(XonoticWaypointDialog, showNotify, void(entity))
+ ATTRIB(XonoticWaypointDialog, title, string, "Waypoints")
+ ATTRIB(XonoticWaypointDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
+ ATTRIB(XonoticWaypointDialog, intendedWidth, float, 0.7)
+ ATTRIB(XonoticWaypointDialog, rows, float, 6)
+ ATTRIB(XonoticWaypointDialog, columns, float, 4)
+ENDCLASS(XonoticWaypointDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticWaypointDialog(entity me)
+{
+ loadAllCvars(me);
+}
+string toStringXonoticWaypointDialog(entity me)
+{
+ return "XXX";
+}
+void fillXonoticWaypointDialog(entity me)
+{
+ entity e, sl;
+
+ me.TR(me);
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint scale:"));
+ me.TD(me, 1, 3, e = makeXonoticSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
+ me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Show names:"));
+ me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_shownames"));
+ e.addValue(e, "Never", "0");
+ e.addValue(e, "Teammates", "1");
+ e.addValue(e, "All players", "2");
+ e.configureXonoticTextSliderValues(e);
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+
+#endif
ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
ATTRIB(MainWindow, winnerDialog, entity, NULL)
- ATTRIB(MainWindow, radarDialog, entity, NULL)
+ ATTRIB(MainWindow, waypointDialog, entity, NULL)
ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
ATTRIB(MainWindow, cvarsDialog, entity, NULL)
ATTRIB(MainWindow, mainNexposee, entity, NULL)
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
- me.radarDialog = i = spawnXonoticRadarDialog();
+ me.waypointDialog = i = spawnXonoticWaypointDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);