From: Samual Lenks Date: Sun, 18 Aug 2013 23:20:11 +0000 (-0400) Subject: Proper file naming X-Git-Tag: xonotic-v0.8.0~139^2~1^2~151 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=d6ddd31a599056b10def3f5f4dd1395c3bb5a27a;p=xonotic%2Fxonotic-data.pk3dir.git Proper file naming --- diff --git a/qcsrc/menu/classes.c b/qcsrc/menu/classes.c index f35b40843..1a8d93bf7 100644 --- a/qcsrc/menu/classes.c +++ b/qcsrc/menu/classes.c @@ -37,7 +37,7 @@ #include "xonotic/dialog_settings_user.c" #include "xonotic/dialog_settings_misc.c" #include "xonotic/dialog_multiplayer.c" -#include "xonotic/dialog_multiplayer_playersetup.c" +#include "xonotic/dialog_multiplayer_profile.c" #include "xonotic/tabcontroller.c" #include "xonotic/textlabel.c" #include "xonotic/slider.c" @@ -79,12 +79,12 @@ #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_weapons.c" +#include "xonotic/dialog_settings_game_crosshair.c" +#include "xonotic/dialog_settings_game_hud.c" +#include "xonotic/dialog_settings_game_hudconfirm.c" +#include "xonotic/dialog_settings_game_model.c" +#include "xonotic/dialog_settings_game_view.c" +#include "xonotic/dialog_settings_game_weapons.c" #include "xonotic/weaponslist.c" #include "xonotic/dialog_multiplayer_media.c" #include "xonotic/dialog_multiplayer_media_demo.c" @@ -116,4 +116,4 @@ #include "xonotic/dialog_hudpanel_physics.c" #include "xonotic/dialog_hudpanel_centerprint.c" #include "xonotic/slider_picmip.c" -#include "xonotic/dialog_multiplayer_playersetup_notification.c" +#include "xonotic/dialog_settings_game_notification.c" diff --git a/qcsrc/menu/xonotic/dialog_multiplayer.c b/qcsrc/menu/xonotic/dialog_multiplayer.c index 564c86791..7d234c7fe 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer.c @@ -21,7 +21,7 @@ void XonoticMultiplayerDialog_fill(entity me) //me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Screenshots"), makeXonoticScreenshotBrowserTab())); //me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Players"), makeXonoticDemoBrowserTab())); me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Media"), makeXonoticMediaTab())); - me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Profile"), makeXonoticPlayerSettingsTab())); + me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Profile"), makeXonoticProfileTab())); me.TR(me); me.TD(me, me.rows - 1, me.columns, mc); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c deleted file mode 100644 index d542536fa..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ /dev/null @@ -1,214 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab) - METHOD(XonoticPlayerSettingsTab, fill, void(entity)) - METHOD(XonoticPlayerSettingsTab, draw, void(entity)) - ATTRIB(XonoticPlayerSettingsTab, title, string, _("Profile")) - ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9) - ATTRIB(XonoticPlayerSettingsTab, rows, float, 23) - ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.2) // added extra .2 for center space - ATTRIB(XonoticPlayerSettingsTab, playerNameLabel, entity, NULL) - ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0) -ENDCLASS(XonoticPlayerSettingsTab) -entity makeXonoticPlayerSettingsTab(); -#endif - -#ifdef IMPLEMENTATION -entity makeXonoticPlayerSettingsTab() -{ - entity me; - me = spawnXonoticPlayerSettingsTab(); - me.configureDialog(me); - return me; -} -void XonoticPlayerSettingsTab_draw(entity me) -{ - if(cvar_string("_cl_name") == "Player") - me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0); - else - me.playerNameLabel.alpha = me.playerNameLabelAlpha; - SUPER(XonoticPlayerSettingsTab).draw(me); -} -void XonoticPlayerSettingsTab_fill(entity me) -{ - entity e, pms, label, box; - float i; - - me.TR(me); - me.TR(me); - me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, _("Name:"))); - me.playerNameLabelAlpha = me.playerNameLabel.alpha; - me.TD(me, 1, 2.5, label = makeXonoticTextLabel(0, string_null)); - label.allowCut = 1; - label.allowColors = 1; - label.alpha = 1; - me.TR(me); - me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name")); - box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved - box.maxLength = -127; // negative means encoded length in bytes - box.saveImmediately = 1; - box.enableClearButton = 0; - label.textEntity = box; - me.TR(me); - me.TD(me, 5, 1, e = makeXonoticColorpicker(box)); - me.TD(me, 5, 2, e = makeXonoticCharmap(box)); - me.TR(me); - me.TR(me); - me.TR(me); - me.TR(me); - me.TR(me); - - // Statistic Stuff -Debugger - me.TR(me); - me.TDempty(me, 0.5); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Player Statistics:"))); - me.TR(me); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Join time:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Total playing time:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Last played:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Games played:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Win / Losses:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Kills / Deaths:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("CTF elo:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DM elo:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("TDM elo:"))); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DUEL elo:"))); - me.TR(me); - - - me.gotoRC(me, 1, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TDempty(me, 1); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Model:"))); - me.TR(me); - pms = makeXonoticPlayerModelSelector(); - me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0')); - e.onClick = PlayerModelSelector_Prev_Click; - e.onClickEntity = pms; - me.TD(me, 13, 2.4, pms); - me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0')); - e.onClick = PlayerModelSelector_Next_Click; - e.onClickEntity = pms; - - me.gotoRC(me, 15, 3.533); me.setFirstColumn(me, me.currentColumn); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color:"))); - for(i = 0; i < 15; ++i) - { - if(mod(i, 5) == 0) - me.TR(me); - me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0'); - } - me.gotoRC(me, 15, 4.866); me.setFirstColumn(me, me.currentColumn); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color:"))); - for(i = 0; i < 15; ++i) - { - if(mod(i, 5) == 0) - me.TR(me); - me.TDNoMargin(me, 1, 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); - me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon crosshair"))); - makeMulti(e, "crosshair_enabled"); - me.TR(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 <= 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 - me.TDempty(me, 0.1); - me.TDNoMargin(me, 3, 0.8, e = makeXonoticCrosshairButton(7, -1), '1 1 0'); // crosshair -1 makes this a preview - setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.1); - 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); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1.0, 0.01, "crosshair_size")); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha")); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair color:"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "1", _("Per weapon"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "2", _("By health"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(5, "crosshair_color_special", "0", _("Custom"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color")); - setDependentAND(e, "crosshair_color_special", 0, 0, "crosshair_enabled", 1, 2); - me.TR(me); - me.TR(me); - me.TR(me); - me.TDempty(me, 0.5); - me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0')); - 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 = 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 = 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 = 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 = 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\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); -} -#endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_crosshair.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_crosshair.c deleted file mode 100644 index a18fec1c4..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_crosshair.c +++ /dev/null @@ -1,95 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticCrosshairDialog) EXTENDS(XonoticDialog) - METHOD(XonoticCrosshairDialog, toString, string(entity)) - METHOD(XonoticCrosshairDialog, fill, void(entity)) - METHOD(XonoticCrosshairDialog, showNotify, void(entity)) - ATTRIB(XonoticCrosshairDialog, title, string, _("Crosshair settings")) - ATTRIB(XonoticCrosshairDialog, color, vector, SKINCOLOR_DIALOG_CROSSHAIR) - ATTRIB(XonoticCrosshairDialog, intendedWidth, float, 0.5) - ATTRIB(XonoticCrosshairDialog, rows, float, 18) - ATTRIB(XonoticCrosshairDialog, columns, float, 3) -ENDCLASS(XonoticCrosshairDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticCrosshairDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticCrosshairDialog_toString(entity me) -{ - return "hi"; // TODO: show status of crosshair dot and hittest and pickups and such here with text -} -void XonoticCrosshairDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot size:"))); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size")); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot alpha:"))); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.1, "crosshair_dot_alpha")); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot color:"))); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "0", _("Use normal crosshair color"))); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "1", _("Custom"))); - setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); - me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_dot_color", "crosshair_dot_color")); - setDependentAND3(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2, "crosshair_dot_color_custom", 1, 1); - me.TR(me); - me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Crosshair animations:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_effect_scalefade", _("Smooth effects of crosshairs"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_ring", _("Use rings to indicate weapon status"))); - makeMulti(e, "crosshair_ring_reload"); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Hit testing:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("crosshair_hittest")); - e.addValue(e, ZCTX(_("HTTST^Disabled")), "0"); - e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1"); - e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25"); - e.configureXonoticTextSliderValues(e); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_hittest_blur", _("Blur crosshair if the shot is obstructed"))); - setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2); - me.TR(me); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.5, 0, "crosshair_hitindication", _("Animate when hitting an enemy"))); - setDependent(e, "crosshair_enabled", 1, 2); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item"))); - setDependent(e, "crosshair_enabled", 1, 2); - - me.TR(me); - - 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 diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hud.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hud.c deleted file mode 100644 index e53f99bc1..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hud.c +++ /dev/null @@ -1,103 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticHUDDialog) EXTENDS(XonoticDialog) - METHOD(XonoticHUDDialog, toString, string(entity)) - METHOD(XonoticHUDDialog, fill, void(entity)) - METHOD(XonoticHUDDialog, showNotify, void(entity)) - ATTRIB(XonoticHUDDialog, title, string, _("HUD settings")) - ATTRIB(XonoticHUDDialog, color, vector, SKINCOLOR_DIALOG_HUD) - ATTRIB(XonoticHUDDialog, intendedWidth, float, 0.5) - ATTRIB(XonoticHUDDialog, rows, float, 18) - ATTRIB(XonoticHUDDialog, columns, float, 3) -ENDCLASS(XonoticHUDDialog) -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); - } -} -void XonoticHUDDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticHUDDialog_toString(entity me) -{ - return "hi"; // TODO: show hud config name with text here -} -void XonoticHUDDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Overlay:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:"))); - setDependent(e, "hud_damage", 0.001, 100); - me.TD(me, 1, 2, e = makeXonoticSlider(0.025, 0.1, 0.025, "hud_damage_factor")); - setDependent(e, "hud_damage", 0.001, 100); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Fade rate:"))); - setDependent(e, "hud_damage", 0.001, 100); - me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate")); - setDependent(e, "hud_damage", 0.001, 100); - me.TR(me); - - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Scale:"))); - setDependent(e, "cl_hidewaypoints", 0, 0); - me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "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, _("Alpha:"))); - setDependent(e, "cl_hidewaypoints", 0, 0); - me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "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, _("Edge offset:"))); - setDependent(e, "cl_hidewaypoints", 0, 0); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom")); - makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right"); - setDependent(e, "cl_hidewaypoints", 0, 0); - me.TR(me); - - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(25, 0, "hud_shownames_crosshairdistance", _("Only when near crosshair"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "hud_shownames_status", _("Display health and armor"))); - me.TR(me); - me.TR(me); - me.TDempty(me, 0.5); - me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0')); - e.onClick = HUDSetup_Check_Gamestatus; - e.onClickEntity = me; - // TODO: show hud config name with text here - - 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 \ No newline at end of file diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c deleted file mode 100644 index b06dc9207..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c +++ /dev/null @@ -1,40 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog) - METHOD(XonoticHUDConfirmDialog, fill, void(entity)) - ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor")) - ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM) - ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5) - ATTRIB(XonoticHUDConfirmDialog, rows, float, 4) - ATTRIB(XonoticHUDConfirmDialog, columns, float, 2) -ENDCLASS(XonoticHUDConfirmDialog) -#endif - -#ifdef IMPLEMENTATION -void HUDSetup_Start(entity me, entity btn) -{ - if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) - localcmd("map hudsetup/hudsetup", "\n"); - else - localcmd("togglemenu 0\n"); - - localcmd("_hud_configure 1", "\n"); -} - -void XonoticHUDConfirmDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game."))); - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?"))); - me.TR(me); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0')); - e.onClick = HUDSetup_Start; - e.onClickEntity = me; - me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0')); - e.onClick = Dialog_Close; - e.onClickEntity = me; -} -#endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c deleted file mode 100644 index c55d4d488..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c +++ /dev/null @@ -1,51 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticModelDialog) EXTENDS(XonoticDialog) - METHOD(XonoticModelDialog, toString, string(entity)) - METHOD(XonoticModelDialog, fill, void(entity)) - METHOD(XonoticModelDialog, showNotify, void(entity)) - ATTRIB(XonoticModelDialog, title, string, _("Model settings")) - ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL) - ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5) - ATTRIB(XonoticModelDialog, rows, float, 7) - ATTRIB(XonoticModelDialog, columns, float, 3) -ENDCLASS(XonoticModelDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticModelDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticModelDialog_toString(entity me) -{ - return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here -} -void XonoticModelDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow")); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs")); - e.addValue(e, ZCTX(_("GIBS^None")), "1"); - e.addValue(e, ZCTX(_("GIBS^Few")), "0.75"); - e.addValue(e, ZCTX(_("GIBS^Many")), "0.5"); - e.addValue(e, ZCTX(_("GIBS^Lots")), "0"); - e.configureXonoticTextSliderValues(e); - setDependent(e, "cl_gentle", 0, 0); - me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine"))); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine"))); - me.TR(me); - - 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 diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_notification.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_notification.c deleted file mode 100644 index 7d4b50bc6..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_notification.c +++ /dev/null @@ -1,96 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticNotificationDialog) EXTENDS(XonoticDialog) - METHOD(XonoticNotificationDialog, toString, string(entity)) - METHOD(XonoticNotificationDialog, fill, void(entity)) - METHOD(XonoticNotificationDialog, showNotify, void(entity)) - ATTRIB(XonoticNotificationDialog, title, string, _("Notification settings")) - ATTRIB(XonoticNotificationDialog, color, vector, SKINCOLOR_DIALOG_MODEL) - ATTRIB(XonoticNotificationDialog, intendedWidth, float, 0.6) - ATTRIB(XonoticNotificationDialog, rows, float, 19) - ATTRIB(XonoticNotificationDialog, columns, float, 3) -ENDCLASS(XonoticNotificationDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticNotificationDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticNotificationDialog_toString(entity me) -{ - return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here -} -void XonoticNotificationDialog_fill(entity me) -{ - entity e; - - // General settings for the player - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("General Settings:"))); - - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_allow_chatboxprint", _("Print all notifications into the chatbox"))); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Notice connecting players:"))); - me.TR(me); - me.TDempty(me, 0.3); - me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_INFO_QUIT_DISCONNECT")); - //makeMulti(me, "notification_INFO_QUIT_KICK_IDLING notification_INFO_QUIT_KICK_SPECTATING notification_INFO_JOIN_PLAY notification_INFO_JOIN_CONNECT_TEAM_BLUE notification_INFO_JOIN_CONNECT_TEAM_PINK notification_INFO_JOIN_CONNECT_TEAM_RED notification_INFO_JOIN_CONNECT_TEAM_YELLOW"); - e.addValue(e, ZCTX(_("off")), "0"); - e.addValue(e, ZCTX(_("only console")), "1"); - e.addValue(e, ZCTX(_("console & chat")), "2"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_ITEM_WEAPON_DONTHAVE", _("Item notifications"))); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications"))); - //makeMulti(e, "notification_CENTER_POWERUP_SHIELD notification_CENTER_POWERUP_SPEED notification_CENTER_POWERUP_STRENGTH notification_CENTER_POWERDOWN_INVISIBILITY notification_CENTER_POWERDOWN_SHIELD notification_CENTER_POWERDOWN_SPEED notification_CENTER_POWERDOWN_STRENGTH notification_CENTER_SUPERWEAPON_BROKEN notification_CENTER_SUPERWEAPON_LOST notification_CENTER_SUPERWEAPON_PICKUP"); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_frag_verbose", _("Additional information on frags"))); - me.TR(me); - me.TR(me); - - // Gamemode specific notifications - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Gamemode notifications:"))); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ARENA_BEGIN", _("Centerprint for gamemode notifications"))); - //makeMulti(me, "notification_CENTER_ARENA_NEEDPLAYER notification_CENTER_ARENA_ROUNDSTART notification_CENTER_ASSAULT_ATTACKING notification_CENTER_ASSAULT_DEFENDING notification_CENTER_CTF_PICKUP_BLUE notification_CENTER_CTF_PICKUP_ENEMY notification_CENTER_CTF_PICKUP_RED notification_CENTER_CTF_PICKUP_TEAM notification_CENTER_FREEZETAG_FREEZE notification_CENTER_FREEZETAG_FROZEN notification_CENTER_FREEZETAG_REVIVE notification_CENTER_FREEZETAG_REVIVED notification_CENTER_FREEZETAG_ROUND_WIN_BLUE notification_CENTER_FREEZETAG_ROUND_WIN_PINK notification_CENTER_FREEZETAG_ROUND_WIN_RED notification_CENTER_FREEZETAG_ROUND_WIN_YELLOW notification_CENTER_FREEZETAG_SELF notification_CENTER_FREEZETAG_SPAWN_LATE notification_CENTER_KEEPAWAY_DROPPED notification_CENTER_KEEPAWAY_PICKUP notification_CENTER_KEEPAWAY_WARN notification_CENTER_KEYHUNT_HELP notification_CENTER_KEYHUNT_INTERFERE_BLUE notification_CENTER_KEYHUNT_INTERFERE_PINK notification_CENTER_KEYHUNT_INTERFERE_RED notification_CENTER_KEYHUNT_INTERFERE_YELLOW notification_CENTER_KEYHUNT_MEET notification_CENTER_KEYHUNT_SCAN notification_CENTER_KEYHUNT_START_BLUE notification_CENTER_KEYHUNT_START_PINK notification_CENTER_KEYHUNT_START_RED notification_CENTER_KEYHUNT_START_YELLOW notification_CENTER_KEYHUNT_WAIT notification_CENTER_LMS_CAMPCHECK"); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_ctf_capture_verbose", _("Additional information on flag captures"))); - me.TR(me); - - // Information on killingsprees - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Information on killingsprees:"))); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Print information on sprees"))); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Show spree information:"))); - me.TR(me); - me.TDempty(me, 0.3); - me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_show_sprees_info")); - e.addValue(e, ZCTX(_("off")), "0"); - e.addValue(e, ZCTX(_("target")), "1"); - e.addValue(e, ZCTX(_("attacker")), "2"); - e.addValue(e, ZCTX(_("target & attacker")), "3"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.1); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print spree information in a new line"))); - - // Close this dialog - 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 \ No newline at end of file diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c deleted file mode 100644 index 59a7e6e79..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c +++ /dev/null @@ -1,117 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticViewDialog) EXTENDS(XonoticDialog) - METHOD(XonoticViewDialog, toString, string(entity)) - METHOD(XonoticViewDialog, fill, void(entity)) - METHOD(XonoticViewDialog, showNotify, void(entity)) - ATTRIB(XonoticViewDialog, title, string, _("View settings")) - ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW) - ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9) - ATTRIB(XonoticViewDialog, rows, float, 11) - ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space -ENDCLASS(XonoticViewDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticViewDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticViewDialog_toString(entity me) -{ - return "hi"; // TODO: show fov and other settings with text here -} -void XonoticViewDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov")); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle")); - e.addValue(e, ZCTX(_("RETICLE^Fullscreen")), "0"); - e.addValue(e, ZCTX(_("RETICLE^With reticle")), "1"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Factor:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor")); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Speed:")))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed")); - e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense. - e.addValue(e, "2", "2"); - e.addValue(e, "3", "3"); - e.addValue(e, "4", "4"); - e.addValue(e, "5", "5"); - e.addValue(e, "6", "6"); - e.addValue(e, "7", "7"); - e.addValue(e, "8", "8"); - e.addValue(e, ZCTX(_("ZOOM^Instant")), "-1"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Sensitivity:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity")); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type")); - e.addValue(e, ZCTX(_("VZOOM^Disabled")), "0"); - e.addValue(e, ZCTX(_("VZOOM^Forward only")), "2"); - e.addValue(e, ZCTX(_("VZOOM^All directions")), "1"); - e.configureXonoticTextSliderValues(e); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Speed")))); - me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom")); - setDependent(e, "cl_velocityzoom_type", 1, 3); - me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating"))); - - me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective"))); - makeMulti(e, "crosshair_hittest_showimpact"); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump"))); - setDependent(e, "chase_active", -1, 0); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching"))); - setDependent(e, "chase_active", -1, 0); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle"))); - setDependent(e, "chase_active", -1, 0); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.01, 0, "cl_bob", _("View bobbing while walking around"))); - makeMulti(e, "cl_bob2"); - setDependent(e, "chase_active", -1, 0); - me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective"))); - makeMulti(e, "crosshair_hittest_showimpact"); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance"))); - setDependent(e, "chase_active", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back")); - setDependent(e, "chase_active", 1, 1); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance"))); - setDependent(e, "chase_active", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up")); - setDependent(e, "chase_active", 1, 1); - me.TR(me); - - 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 diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c deleted file mode 100644 index fa3549154..000000000 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c +++ /dev/null @@ -1,78 +0,0 @@ -#ifdef INTERFACE -CLASS(XonoticWeaponsDialog) EXTENDS(XonoticDialog) - METHOD(XonoticWeaponsDialog, toString, string(entity)) - METHOD(XonoticWeaponsDialog, fill, void(entity)) - METHOD(XonoticWeaponsDialog, showNotify, void(entity)) - ATTRIB(XonoticWeaponsDialog, title, string, _("Weapon settings")) - ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS) - ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.7) - ATTRIB(XonoticWeaponsDialog, rows, float, 12) - ATTRIB(XonoticWeaponsDialog, columns, float, 5.2) - ATTRIB(XonoticWeaponsDialog, weaponsList, entity, NULL) -ENDCLASS(XonoticWeaponsDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticWeaponsDialog_showNotify(entity me) -{ - loadAllCvars(me); -} -string XonoticWeaponsDialog_toString(entity me) -{ - return me.weaponsList.toString(me.weaponsList); -} -void XonoticWeaponsDialog_fill(entity me) -{ - entity e; - - me.TR(me); - me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon priority list:"))); - me.TR(me); - me.TD(me, 8, 2, e = me.weaponsList = makeXonoticWeaponsList()); - me.gotoRC(me, 9, 0); - me.TD(me, 1, 1, e = makeXonoticButton(_("Up"), '0 0 0')); - e.onClick = WeaponsList_MoveUp_Click; - e.onClickEntity = me.weaponsList; - me.TD(me, 1, 1, e = makeXonoticButton(_("Down"), '0 0 0')); - e.onClick = WeaponsList_MoveDown_Click; - e.onClickEntity = me.weaponsList; - - me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling"))); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup"))); - me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model"))); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align"))); - setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center"))); - setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align"))); - setDependent(e, "r_drawviewmodel", 1, 1); - me.TR(me); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_followmodel", _("Gun model swaying"))); - makeMulti(e, "cl_leanmodel"); - setDependent(e, "r_drawviewmodel", 1, 1); - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_bobmodel", _("Gun model bobbing"))); - setDependent(e, "r_drawviewmodel", 1, 1); - //me.TR(me); - //me.TR(me); - // me.TDempty(me, 0.2); - // me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VWMDL^Scale")))); - // setDependent(e, "r_drawviewmodel", 1, 1); - // me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale")); - // setDependent(e, "r_drawviewmodel", 1, 1); - - 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 diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.c b/qcsrc/menu/xonotic/dialog_multiplayer_profile.c new file mode 100644 index 000000000..668d808bf --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.c @@ -0,0 +1,214 @@ +#ifdef INTERFACE +CLASS(XonoticProfileTab) EXTENDS(XonoticTab) + METHOD(XonoticProfileTab, fill, void(entity)) + METHOD(XonoticProfileTab, draw, void(entity)) + ATTRIB(XonoticProfileTab, title, string, _("Profile")) + ATTRIB(XonoticProfileTab, intendedWidth, float, 0.9) + ATTRIB(XonoticProfileTab, rows, float, 23) + ATTRIB(XonoticProfileTab, columns, float, 6.2) // added extra .2 for center space + ATTRIB(XonoticProfileTab, playerNameLabel, entity, NULL) + ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, 0) +ENDCLASS(XonoticProfileTab) +entity makeXonoticProfileTab(); +#endif + +#ifdef IMPLEMENTATION +entity makeXonoticProfileTab() +{ + entity me; + me = spawnXonoticProfileTab(); + me.configureDialog(me); + return me; +} +void XonoticProfileTab_draw(entity me) +{ + if(cvar_string("_cl_name") == "Player") + me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0); + else + me.playerNameLabel.alpha = me.playerNameLabelAlpha; + SUPER(XonoticProfileTab).draw(me); +} +void XonoticProfileTab_fill(entity me) +{ + entity e, pms, label, box; + float i; + + me.TR(me); + me.TR(me); + me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, _("Name:"))); + me.playerNameLabelAlpha = me.playerNameLabel.alpha; + me.TD(me, 1, 2.5, label = makeXonoticTextLabel(0, string_null)); + label.allowCut = 1; + label.allowColors = 1; + label.alpha = 1; + me.TR(me); + me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name")); + box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved + box.maxLength = -127; // negative means encoded length in bytes + box.saveImmediately = 1; + box.enableClearButton = 0; + label.textEntity = box; + me.TR(me); + me.TD(me, 5, 1, e = makeXonoticColorpicker(box)); + me.TD(me, 5, 2, e = makeXonoticCharmap(box)); + me.TR(me); + me.TR(me); + me.TR(me); + me.TR(me); + me.TR(me); + + // Statistic Stuff -Debugger + me.TR(me); + me.TDempty(me, 0.5); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Player Statistics:"))); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Join time:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Total playing time:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Last played:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Games played:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Win / Losses:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Kills / Deaths:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("CTF elo:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DM elo:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("TDM elo:"))); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DUEL elo:"))); + me.TR(me); + + + me.gotoRC(me, 1, 3.2); me.setFirstColumn(me, me.currentColumn); + me.TDempty(me, 1); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Model:"))); + me.TR(me); + pms = makeXonoticPlayerModelSelector(); + me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0')); + e.onClick = PlayerModelSelector_Prev_Click; + e.onClickEntity = pms; + me.TD(me, 13, 2.4, pms); + me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0')); + e.onClick = PlayerModelSelector_Next_Click; + e.onClickEntity = pms; + + me.gotoRC(me, 15, 3.533); me.setFirstColumn(me, me.currentColumn); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color:"))); + for(i = 0; i < 15; ++i) + { + if(mod(i, 5) == 0) + me.TR(me); + me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0'); + } + me.gotoRC(me, 15, 4.866); me.setFirstColumn(me, me.currentColumn); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color:"))); + for(i = 0; i < 15; ++i) + { + if(mod(i, 5) == 0) + me.TR(me); + me.TDNoMargin(me, 1, 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); + me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon crosshair"))); + makeMulti(e, "crosshair_enabled"); + me.TR(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 <= 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 + me.TDempty(me, 0.1); + me.TDNoMargin(me, 3, 0.8, e = makeXonoticCrosshairButton(7, -1), '1 1 0'); // crosshair -1 makes this a preview + setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.1); + 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); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1.0, 0.01, "crosshair_size")); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha")); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair color:"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "1", _("Per weapon"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "2", _("By health"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(5, "crosshair_color_special", "0", _("Custom"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color")); + setDependentAND(e, "crosshair_color_special", 0, 0, "crosshair_enabled", 1, 2); + me.TR(me); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.5); + me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0')); + 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 = 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 = 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 = 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 = 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\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); +} +#endif diff --git a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.c b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.c new file mode 100644 index 000000000..a18fec1c4 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.c @@ -0,0 +1,95 @@ +#ifdef INTERFACE +CLASS(XonoticCrosshairDialog) EXTENDS(XonoticDialog) + METHOD(XonoticCrosshairDialog, toString, string(entity)) + METHOD(XonoticCrosshairDialog, fill, void(entity)) + METHOD(XonoticCrosshairDialog, showNotify, void(entity)) + ATTRIB(XonoticCrosshairDialog, title, string, _("Crosshair settings")) + ATTRIB(XonoticCrosshairDialog, color, vector, SKINCOLOR_DIALOG_CROSSHAIR) + ATTRIB(XonoticCrosshairDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticCrosshairDialog, rows, float, 18) + ATTRIB(XonoticCrosshairDialog, columns, float, 3) +ENDCLASS(XonoticCrosshairDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticCrosshairDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticCrosshairDialog_toString(entity me) +{ + return "hi"; // TODO: show status of crosshair dot and hittest and pickups and such here with text +} +void XonoticCrosshairDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot size:"))); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size")); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot alpha:"))); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.1, "crosshair_dot_alpha")); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot color:"))); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "0", _("Use normal crosshair color"))); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 0.8, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "1", _("Custom"))); + setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2); + me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_dot_color", "crosshair_dot_color")); + setDependentAND3(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2, "crosshair_dot_color_custom", 1, 1); + me.TR(me); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Crosshair animations:"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_effect_scalefade", _("Smooth effects of crosshairs"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_ring", _("Use rings to indicate weapon status"))); + makeMulti(e, "crosshair_ring_reload"); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Hit testing:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("crosshair_hittest")); + e.addValue(e, ZCTX(_("HTTST^Disabled")), "0"); + e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1"); + e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25"); + e.configureXonoticTextSliderValues(e); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_hittest_blur", _("Blur crosshair if the shot is obstructed"))); + setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.5, 0, "crosshair_hitindication", _("Animate when hitting an enemy"))); + setDependent(e, "crosshair_enabled", 1, 2); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item"))); + setDependent(e, "crosshair_enabled", 1, 2); + + me.TR(me); + + 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 diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hud.c b/qcsrc/menu/xonotic/dialog_settings_game_hud.c new file mode 100644 index 000000000..e53f99bc1 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_hud.c @@ -0,0 +1,103 @@ +#ifdef INTERFACE +CLASS(XonoticHUDDialog) EXTENDS(XonoticDialog) + METHOD(XonoticHUDDialog, toString, string(entity)) + METHOD(XonoticHUDDialog, fill, void(entity)) + METHOD(XonoticHUDDialog, showNotify, void(entity)) + ATTRIB(XonoticHUDDialog, title, string, _("HUD settings")) + ATTRIB(XonoticHUDDialog, color, vector, SKINCOLOR_DIALOG_HUD) + ATTRIB(XonoticHUDDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticHUDDialog, rows, float, 18) + ATTRIB(XonoticHUDDialog, columns, float, 3) +ENDCLASS(XonoticHUDDialog) +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); + } +} +void XonoticHUDDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticHUDDialog_toString(entity me) +{ + return "hi"; // TODO: show hud config name with text here +} +void XonoticHUDDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Overlay:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:"))); + setDependent(e, "hud_damage", 0.001, 100); + me.TD(me, 1, 2, e = makeXonoticSlider(0.025, 0.1, 0.025, "hud_damage_factor")); + setDependent(e, "hud_damage", 0.001, 100); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Fade rate:"))); + setDependent(e, "hud_damage", 0.001, 100); + me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate")); + setDependent(e, "hud_damage", 0.001, 100); + me.TR(me); + + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Scale:"))); + setDependent(e, "cl_hidewaypoints", 0, 0); + me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "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, _("Alpha:"))); + setDependent(e, "cl_hidewaypoints", 0, 0); + me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "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, _("Edge offset:"))); + setDependent(e, "cl_hidewaypoints", 0, 0); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom")); + makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right"); + setDependent(e, "cl_hidewaypoints", 0, 0); + me.TR(me); + + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(25, 0, "hud_shownames_crosshairdistance", _("Only when near crosshair"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "hud_shownames_status", _("Display health and armor"))); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.5); + me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0')); + e.onClick = HUDSetup_Check_Gamestatus; + e.onClickEntity = me; + // TODO: show hud config name with text here + + 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 \ No newline at end of file diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.c b/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.c new file mode 100644 index 000000000..b06dc9207 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.c @@ -0,0 +1,40 @@ +#ifdef INTERFACE +CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog) + METHOD(XonoticHUDConfirmDialog, fill, void(entity)) + ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor")) + ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM) + ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticHUDConfirmDialog, rows, float, 4) + ATTRIB(XonoticHUDConfirmDialog, columns, float, 2) +ENDCLASS(XonoticHUDConfirmDialog) +#endif + +#ifdef IMPLEMENTATION +void HUDSetup_Start(entity me, entity btn) +{ + if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) + localcmd("map hudsetup/hudsetup", "\n"); + else + localcmd("togglemenu 0\n"); + + localcmd("_hud_configure 1", "\n"); +} + +void XonoticHUDConfirmDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game."))); + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?"))); + me.TR(me); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0')); + e.onClick = HUDSetup_Start; + e.onClickEntity = me; + me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0')); + e.onClick = Dialog_Close; + e.onClickEntity = me; +} +#endif diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.c b/qcsrc/menu/xonotic/dialog_settings_game_model.c new file mode 100644 index 000000000..c55d4d488 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.c @@ -0,0 +1,51 @@ +#ifdef INTERFACE +CLASS(XonoticModelDialog) EXTENDS(XonoticDialog) + METHOD(XonoticModelDialog, toString, string(entity)) + METHOD(XonoticModelDialog, fill, void(entity)) + METHOD(XonoticModelDialog, showNotify, void(entity)) + ATTRIB(XonoticModelDialog, title, string, _("Model settings")) + ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL) + ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5) + ATTRIB(XonoticModelDialog, rows, float, 7) + ATTRIB(XonoticModelDialog, columns, float, 3) +ENDCLASS(XonoticModelDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticModelDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticModelDialog_toString(entity me) +{ + return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here +} +void XonoticModelDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow")); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs")); + e.addValue(e, ZCTX(_("GIBS^None")), "1"); + e.addValue(e, ZCTX(_("GIBS^Few")), "0.75"); + e.addValue(e, ZCTX(_("GIBS^Many")), "0.5"); + e.addValue(e, ZCTX(_("GIBS^Lots")), "0"); + e.configureXonoticTextSliderValues(e); + setDependent(e, "cl_gentle", 0, 0); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine"))); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine"))); + me.TR(me); + + 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 diff --git a/qcsrc/menu/xonotic/dialog_settings_game_notification.c b/qcsrc/menu/xonotic/dialog_settings_game_notification.c new file mode 100644 index 000000000..7d4b50bc6 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_notification.c @@ -0,0 +1,96 @@ +#ifdef INTERFACE +CLASS(XonoticNotificationDialog) EXTENDS(XonoticDialog) + METHOD(XonoticNotificationDialog, toString, string(entity)) + METHOD(XonoticNotificationDialog, fill, void(entity)) + METHOD(XonoticNotificationDialog, showNotify, void(entity)) + ATTRIB(XonoticNotificationDialog, title, string, _("Notification settings")) + ATTRIB(XonoticNotificationDialog, color, vector, SKINCOLOR_DIALOG_MODEL) + ATTRIB(XonoticNotificationDialog, intendedWidth, float, 0.6) + ATTRIB(XonoticNotificationDialog, rows, float, 19) + ATTRIB(XonoticNotificationDialog, columns, float, 3) +ENDCLASS(XonoticNotificationDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticNotificationDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticNotificationDialog_toString(entity me) +{ + return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here +} +void XonoticNotificationDialog_fill(entity me) +{ + entity e; + + // General settings for the player + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("General Settings:"))); + + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_allow_chatboxprint", _("Print all notifications into the chatbox"))); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Notice connecting players:"))); + me.TR(me); + me.TDempty(me, 0.3); + me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_INFO_QUIT_DISCONNECT")); + //makeMulti(me, "notification_INFO_QUIT_KICK_IDLING notification_INFO_QUIT_KICK_SPECTATING notification_INFO_JOIN_PLAY notification_INFO_JOIN_CONNECT_TEAM_BLUE notification_INFO_JOIN_CONNECT_TEAM_PINK notification_INFO_JOIN_CONNECT_TEAM_RED notification_INFO_JOIN_CONNECT_TEAM_YELLOW"); + e.addValue(e, ZCTX(_("off")), "0"); + e.addValue(e, ZCTX(_("only console")), "1"); + e.addValue(e, ZCTX(_("console & chat")), "2"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_ITEM_WEAPON_DONTHAVE", _("Item notifications"))); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications"))); + //makeMulti(e, "notification_CENTER_POWERUP_SHIELD notification_CENTER_POWERUP_SPEED notification_CENTER_POWERUP_STRENGTH notification_CENTER_POWERDOWN_INVISIBILITY notification_CENTER_POWERDOWN_SHIELD notification_CENTER_POWERDOWN_SPEED notification_CENTER_POWERDOWN_STRENGTH notification_CENTER_SUPERWEAPON_BROKEN notification_CENTER_SUPERWEAPON_LOST notification_CENTER_SUPERWEAPON_PICKUP"); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_frag_verbose", _("Additional information on frags"))); + me.TR(me); + me.TR(me); + + // Gamemode specific notifications + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Gamemode notifications:"))); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ARENA_BEGIN", _("Centerprint for gamemode notifications"))); + //makeMulti(me, "notification_CENTER_ARENA_NEEDPLAYER notification_CENTER_ARENA_ROUNDSTART notification_CENTER_ASSAULT_ATTACKING notification_CENTER_ASSAULT_DEFENDING notification_CENTER_CTF_PICKUP_BLUE notification_CENTER_CTF_PICKUP_ENEMY notification_CENTER_CTF_PICKUP_RED notification_CENTER_CTF_PICKUP_TEAM notification_CENTER_FREEZETAG_FREEZE notification_CENTER_FREEZETAG_FROZEN notification_CENTER_FREEZETAG_REVIVE notification_CENTER_FREEZETAG_REVIVED notification_CENTER_FREEZETAG_ROUND_WIN_BLUE notification_CENTER_FREEZETAG_ROUND_WIN_PINK notification_CENTER_FREEZETAG_ROUND_WIN_RED notification_CENTER_FREEZETAG_ROUND_WIN_YELLOW notification_CENTER_FREEZETAG_SELF notification_CENTER_FREEZETAG_SPAWN_LATE notification_CENTER_KEEPAWAY_DROPPED notification_CENTER_KEEPAWAY_PICKUP notification_CENTER_KEEPAWAY_WARN notification_CENTER_KEYHUNT_HELP notification_CENTER_KEYHUNT_INTERFERE_BLUE notification_CENTER_KEYHUNT_INTERFERE_PINK notification_CENTER_KEYHUNT_INTERFERE_RED notification_CENTER_KEYHUNT_INTERFERE_YELLOW notification_CENTER_KEYHUNT_MEET notification_CENTER_KEYHUNT_SCAN notification_CENTER_KEYHUNT_START_BLUE notification_CENTER_KEYHUNT_START_PINK notification_CENTER_KEYHUNT_START_RED notification_CENTER_KEYHUNT_START_YELLOW notification_CENTER_KEYHUNT_WAIT notification_CENTER_LMS_CAMPCHECK"); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_ctf_capture_verbose", _("Additional information on flag captures"))); + me.TR(me); + + // Information on killingsprees + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Information on killingsprees:"))); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Print information on sprees"))); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Show spree information:"))); + me.TR(me); + me.TDempty(me, 0.3); + me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_show_sprees_info")); + e.addValue(e, ZCTX(_("off")), "0"); + e.addValue(e, ZCTX(_("target")), "1"); + e.addValue(e, ZCTX(_("attacker")), "2"); + e.addValue(e, ZCTX(_("target & attacker")), "3"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.1); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print spree information in a new line"))); + + // Close this dialog + 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 \ No newline at end of file diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.c b/qcsrc/menu/xonotic/dialog_settings_game_view.c new file mode 100644 index 000000000..59a7e6e79 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.c @@ -0,0 +1,117 @@ +#ifdef INTERFACE +CLASS(XonoticViewDialog) EXTENDS(XonoticDialog) + METHOD(XonoticViewDialog, toString, string(entity)) + METHOD(XonoticViewDialog, fill, void(entity)) + METHOD(XonoticViewDialog, showNotify, void(entity)) + ATTRIB(XonoticViewDialog, title, string, _("View settings")) + ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW) + ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9) + ATTRIB(XonoticViewDialog, rows, float, 11) + ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space +ENDCLASS(XonoticViewDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticViewDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticViewDialog_toString(entity me) +{ + return "hi"; // TODO: show fov and other settings with text here +} +void XonoticViewDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov")); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle")); + e.addValue(e, ZCTX(_("RETICLE^Fullscreen")), "0"); + e.addValue(e, ZCTX(_("RETICLE^With reticle")), "1"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Factor:")))); + me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Speed:")))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed")); + e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense. + e.addValue(e, "2", "2"); + e.addValue(e, "3", "3"); + e.addValue(e, "4", "4"); + e.addValue(e, "5", "5"); + e.addValue(e, "6", "6"); + e.addValue(e, "7", "7"); + e.addValue(e, "8", "8"); + e.addValue(e, ZCTX(_("ZOOM^Instant")), "-1"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Sensitivity:")))); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity")); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type")); + e.addValue(e, ZCTX(_("VZOOM^Disabled")), "0"); + e.addValue(e, ZCTX(_("VZOOM^Forward only")), "2"); + e.addValue(e, ZCTX(_("VZOOM^All directions")), "1"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Speed")))); + me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom")); + setDependent(e, "cl_velocityzoom_type", 1, 3); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating"))); + + me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); + me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective"))); + makeMulti(e, "crosshair_hittest_showimpact"); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump"))); + setDependent(e, "chase_active", -1, 0); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching"))); + setDependent(e, "chase_active", -1, 0); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle"))); + setDependent(e, "chase_active", -1, 0); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.01, 0, "cl_bob", _("View bobbing while walking around"))); + makeMulti(e, "cl_bob2"); + setDependent(e, "chase_active", -1, 0); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective"))); + makeMulti(e, "crosshair_hittest_showimpact"); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance"))); + setDependent(e, "chase_active", 1, 1); + me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back")); + setDependent(e, "chase_active", 1, 1); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance"))); + setDependent(e, "chase_active", 1, 1); + me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up")); + setDependent(e, "chase_active", 1, 1); + me.TR(me); + + 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 diff --git a/qcsrc/menu/xonotic/dialog_settings_game_weapons.c b/qcsrc/menu/xonotic/dialog_settings_game_weapons.c new file mode 100644 index 000000000..fa3549154 --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_settings_game_weapons.c @@ -0,0 +1,78 @@ +#ifdef INTERFACE +CLASS(XonoticWeaponsDialog) EXTENDS(XonoticDialog) + METHOD(XonoticWeaponsDialog, toString, string(entity)) + METHOD(XonoticWeaponsDialog, fill, void(entity)) + METHOD(XonoticWeaponsDialog, showNotify, void(entity)) + ATTRIB(XonoticWeaponsDialog, title, string, _("Weapon settings")) + ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS) + ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.7) + ATTRIB(XonoticWeaponsDialog, rows, float, 12) + ATTRIB(XonoticWeaponsDialog, columns, float, 5.2) + ATTRIB(XonoticWeaponsDialog, weaponsList, entity, NULL) +ENDCLASS(XonoticWeaponsDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticWeaponsDialog_showNotify(entity me) +{ + loadAllCvars(me); +} +string XonoticWeaponsDialog_toString(entity me) +{ + return me.weaponsList.toString(me.weaponsList); +} +void XonoticWeaponsDialog_fill(entity me) +{ + entity e; + + me.TR(me); + me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon priority list:"))); + me.TR(me); + me.TD(me, 8, 2, e = me.weaponsList = makeXonoticWeaponsList()); + me.gotoRC(me, 9, 0); + me.TD(me, 1, 1, e = makeXonoticButton(_("Up"), '0 0 0')); + e.onClick = WeaponsList_MoveUp_Click; + e.onClickEntity = me.weaponsList; + me.TD(me, 1, 1, e = makeXonoticButton(_("Down"), '0 0 0')); + e.onClick = WeaponsList_MoveDown_Click; + e.onClickEntity = me.weaponsList; + + me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling"))); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup"))); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align"))); + setDependent(e, "r_drawviewmodel", 1, 1); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center"))); + setDependent(e, "r_drawviewmodel", 1, 1); + me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align"))); + setDependent(e, "r_drawviewmodel", 1, 1); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_followmodel", _("Gun model swaying"))); + makeMulti(e, "cl_leanmodel"); + setDependent(e, "r_drawviewmodel", 1, 1); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_bobmodel", _("Gun model bobbing"))); + setDependent(e, "r_drawviewmodel", 1, 1); + //me.TR(me); + //me.TR(me); + // me.TDempty(me, 0.2); + // me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VWMDL^Scale")))); + // setDependent(e, "r_drawviewmodel", 1, 1); + // me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale")); + // setDependent(e, "r_drawviewmodel", 1, 1); + + 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