X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_multiplayer_playersetup.c;h=d33a1eab12d5439e5435280fd40cd3439f3503f9;hb=ca387f77b7b8044475a7c359e22d2e6d4ebf513d;hp=4a63e198f6bef769eff99dafaca0c9071b0b2648;hpb=21df0729c996ccada7a75266e5fd714ab70c319d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c index 4a63e198f..d33a1eab1 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c @@ -10,12 +10,9 @@ CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab) ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0) ENDCLASS(XonoticPlayerSettingsTab) entity makeXonoticPlayerSettingsTab(); - -void HUDSetup_Join_Click(entity me, entity btn); #endif #ifdef IMPLEMENTATION - entity makeXonoticPlayerSettingsTab() { entity me; @@ -33,7 +30,7 @@ void XonoticPlayerSettingsTab_draw(entity me) } void XonoticPlayerSettingsTab_fill(entity me) { - entity e, pms, sl, label, e0, box; + entity e, pms, label, box; float i, r, m, n; me.TR(me); @@ -64,13 +61,13 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0')); e.onClick = PlayerModelSelector_Prev_Click; e.onClickEntity = pms; - me.TD(me, me.rows - (me.currentRow + 3), 1.8, pms); + me.TD(me, me.rows - (me.currentRow + 2), 1.8, pms); me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0')); e.onClick = PlayerModelSelector_Next_Click; e.onClickEntity = pms; me.TR(me); r = me.currentRow; - m = me.rows - (r + 4); + m = me.rows - (r + 3); n = 16 - !cvar("developer"); m = m / (n - 1); for(i = 0; i < n; ++i) @@ -84,6 +81,9 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TDNoMargin(me, m, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0'); } + + // crosshair_enabled: 0 = no crosshair options, 1 = no crosshair selection, but everything else enabled, 2 = all crosshair options enabled + // FIXME: In the future, perhaps make one global crosshair_type cvar which has 0 for disabled, 1 for custom, 2 for per weapon, etc? me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "0", _("No crosshair"))); me.TR(me); @@ -93,8 +93,8 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom crosshair"))); me.TR(me); me.TDempty(me, 0.1); - for(i = 1; i <= 10; ++i) { - me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0'); + for(i = 1; i <= 14; ++i) { + me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0'); setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); } // show a larger preview of the selected crosshair @@ -103,14 +103,8 @@ void XonoticPlayerSettingsTab_fill(entity me) setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); me.TR(me); me.TDempty(me, 0.1); - for(i = 11; i <= 20; ++i) { - me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0'); - setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); - } - me.TR(me); - me.TDempty(me, 0.1); - for(i = 21; i <= 30; ++i) { - me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(4, i), '1 1 0'); + for(i = 15; i <= 28; ++i) { + me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0'); setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); } me.TR(me); @@ -134,7 +128,7 @@ void XonoticPlayerSettingsTab_fill(entity me) setDependent(e, "crosshair_enabled", 1, 2); me.TR(me); me.TDempty(me, 0.1); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(5, string_null, string_null, _("Custom"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(5, string_null, string_null, _("Custom"))); setDependent(e, "crosshair_enabled", 1, 2); me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color")); setDependentAND3(e, "crosshair_color_per_weapon", 0, 0, "crosshair_color_by_health", 0, 0, "crosshair_enabled", 1, 2); @@ -143,42 +137,41 @@ void XonoticPlayerSettingsTab_fill(entity me) me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0')); - e.onClick = HUDSetup_Join_Click; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.crosshairDialog; setDependent(e, "crosshair_enabled", 1, 2); + // TODO: show status of crosshair dot and hittest and pickups and such here with text me.TR(me); me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Model settings"), '0 0 0')); - e.onClick = HUDSetup_Join_Click; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.modelDialog; + // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("View settings"), '0 0 0')); - e.onClick = HUDSetup_Join_Click; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.viewDialog; + // TODO: show fov and other settings with text here me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Weapon settings"), '0 0 0')); - e.onClick = HUDSetup_Join_Click; - e.onClickEntity = me; + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.weaponsDialog; + // I don't really think this is useful as is, and especially it doesn't look very clean... + // In the future, if ALL of these buttons had some information, then it would be justified/clean + //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null)); + // e0.textEntity = main.weaponsDialog; + // e0.allowCut = 1; me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0')); - e.onClick = HUDSetup_Join_Click; - 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); - 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_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 hudsetup/hudsetup", "\n"); - } - else - localcmd("togglemenu 0\n"); - localcmd("_hud_configure 1", "\n"); + me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); } #endif