]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Use an even uglier hack in the menu, until I can figure out the right maths. Sometime...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 16:53:13 +0000 (18:53 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 16:53:13 +0000 (18:53 +0200)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_settings_audio.c

index cc23364add92d2c7c05144d97e879e80b0be2b81..639bf5c845d0a2d9d5ab0770e9cd33dffe27a2cd 100644 (file)
@@ -1056,6 +1056,8 @@ seta menu_skin "earthy"
 set menu_slowmo 1\r
 seta menu_sounds 2 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"\r
 \r
+set menu_block_sound_sliders 0 "part of an ugly hack to allow the cl_vore_cutvolume cvars to work properly"\r
+\r
 r_textbrightness 0.2\r
 r_textcontrast 0.8\r
 r_textshadow 1\r
index f7a268e1bc66d72fd5afbd08d073f474a98105ae..e4d4aa3d195eb952d6a9059fad6758edc580088d 100644 (file)
@@ -735,6 +735,9 @@ void CSQC_UpdateView(float w, float h)
                        cvar_set("volume", ftos(volume_modify_1));\r
                        cvar_set("bgmvolume", ftos(volume_modify_2));\r
                        // TODO: Setting the "volume" cvar is a bad way to go, and modifies the menu slider! We need a better way\r
+\r
+                       if(!cvar("menu_block_sound_sliders"))\r
+                               cvar_set("menu_block_sound_sliders", "1"); // ugly hack to block the sound sliders\r
                }\r
                else if not(getstati(STAT_VORE_EATEN))\r
                {\r
@@ -742,8 +745,13 @@ void CSQC_UpdateView(float w, float h)
                        // so if we change the volume settings, update the initial volume\r
                        volume_modify_default_1 = cvar("volume");\r
                        volume_modify_default_2 = cvar("bgmvolume");\r
+\r
+                       if(cvar("menu_block_sound_sliders"))\r
+                               cvar_set("menu_block_sound_sliders", "0"); // ugly hack to block the sound sliders\r
                }\r
        }\r
+       else if(cvar("menu_block_sound_sliders"))\r
+               cvar_set("menu_block_sound_sliders", "0"); // ugly hack to block the sound sliders\r
 \r
        // Draw the mouse cursor\r
        // NOTE: drawpic must happen after R_RenderScene for some reason\r
index 8d68649ad8202def6809ab7cd10592369f3d7ab7..5968216c22747feaf4ae13270ca719e599c1db05 100644 (file)
@@ -26,11 +26,15 @@ void fillVoretAudioSettingsTab(entity me)
                s = makeVoretDecibelsSlider(-20, 0, 0.5, "bgmvolume");\r
                me.TD(me, 1, 1, e = makeVoretSliderCheckBox(-1000000, 1, s, "Music:"));\r
                me.TD(me, 1, 2, s);\r
+               setDependent(e, "menu_block_sound_sliders", 0, 0); // part of an ugly hack that needs to be fixed\r
+               setDependent(s, "menu_block_sound_sliders", 0, 0); // part of an ugly hack that needs to be fixed\r
        me.TR(me);\r
        me.TR(me);\r
                s = makeVoretDecibelsSlider(-20, 0, 0.5, "volume");\r
                me.TD(me, 1, 1, e = makeVoretSliderCheckBox(-1000000, 1, s, "Master:"));\r
                me.TD(me, 1, 2, s);\r
+               setDependent(e, "menu_block_sound_sliders", 0, 0); // part of an ugly hack that needs to be fixed\r
+               setDependent(s, "menu_block_sound_sliders", 0, 0); // part of an ugly hack that needs to be fixed\r
        me.TR(me);\r
                me.TDempty(me, 0.2);\r
                s = makeVoretDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");\r