]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_settings_user.qc
Add TheAudioMonkey to credits
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_user.qc
index 35246ae1700159de66f3dc23760cf1ce93204b48..fc6521c4d2b9a7bd03e9b567ceecb9dd6f9247d2 100644 (file)
@@ -1,16 +1,11 @@
-#ifndef DIALOG_SETTINGS_USER_H
-#define DIALOG_SETTINGS_USER_H
-#include "tab.qc"
-CLASS(XonoticUserSettingsTab, XonoticTab)
-       METHOD(XonoticUserSettingsTab, fill, void(entity))
-       ATTRIB(XonoticUserSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(XonoticUserSettingsTab, rows, float, 15.5)
-       ATTRIB(XonoticUserSettingsTab, columns, float, 6)
-ENDCLASS(XonoticUserSettingsTab)
-entity makeXonoticUserSettingsTab();
-#endif
+#include "dialog_settings_user.qh"
+
+#include "commandbutton.qh"
+#include "textlabel.qh"
+#include "languagelist.qh"
+#include "skinlist.qh"
+#include "checkbox.qh"
 
-#ifdef IMPLEMENTATION
 entity makeXonoticUserSettingsTab()
 {
        entity me;
@@ -21,16 +16,17 @@ entity makeXonoticUserSettingsTab()
 
 void XonoticUserSettingsTab_fill(entity me)
 {
-       entity e;
-       entity sk;
+       entity e, sk;
+       entity userApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle;", COMMANDBUTTON_APPLY);
+       userApplyButton.disableOnClick = true;
 
        me.TR(me);
                me.TDempty(me, 0.25);
                me.TD(me, 1, 2.5, e = makeXonoticHeaderLabel(_("Menu Skins")));
        me.TR(me);
                me.TDempty(me, 0.25);
-               me.TD(me, me.rows - 2.5, 2.5, sk = makeXonoticSkinList());
-       me.gotoRC(me, me.rows - 1.5, 0.25);
+               me.TD(me, me.rows - 3.5, 2.5, sk = makeXonoticSkinList());
+       me.gotoRC(me, me.rows - 2.5, 0.25);
                me.TD(me, 1, 2.5, e = makeXonoticButton(_("Set skin"), '0 0 0'));
                        e.onClick = SetSkin_Click;
                        e.onClickEntity = sk;
@@ -75,23 +71,11 @@ void XonoticUserSettingsTab_fill(entity me)
                        e.onClickEntity = sk;
 
        me.gotoRC(me, 11.5, 3.25); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language")));
-
-       //me.TR(me);
-       //      me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
-       //      me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips"));
-       //              e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0");
-       //              e.addValue(e, ZCTX(_("TLTIP^Standard")), "1");
-       //              e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2");
-       //              e.configureXonoticTextSliderValues(e);
-       //me.TR(me);
-       //      me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uidtracking", _("Allow player statistics to track your client"))); // TODO: move to profile tab
-       //me.TR(me);
-       //      me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname")));
-       //      setDependent(e, "cl_allow_uidtracking", 1, 1);
+               me.TD(me, 1, 2.5, e = makeXonoticCheckBox_T(0, "cl_gentle", _("Disable gore effects and harsh language"),
+                       _("Replace blood and gibs with content that does not have any gore effects (default: disabled)")));
+                       e.applyButton = userApplyButton;
 
-       //me.gotoRC(me, me.rows - 1, 2.6);
-       //      me.TD(me, 1, 2, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle; sendcvar cl_allow_uidtracking; sendcvar cl_allow_uid2name;", COMMANDBUTTON_APPLY));
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, 6, userApplyButton);
 
 }
-#endif