]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
Merge branch 'master' into Mario/qc_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index 94d167e5ed560d3de78073a9c11db770bf81ad2c..e348796a0f89747b89e16fa315684d4ae0edddc7 100644 (file)
@@ -12,7 +12,7 @@
 
 float mouseButtonsPressed;
 vector menuMousePos;
-float menuShiftState;
+int menuShiftState;
 float menuPrevTime;
 float menuAlpha;
 float menuLogoAlpha;
@@ -1003,3 +1003,20 @@ void m_goto(string itemname)
                }
        }
 }
+
+float menuLastFocusSoundTime;
+void m_play_focus_sound()
+{
+       if(cvar("menu_sounds") > 1)
+               if(time - menuLastFocusSoundTime > 0.25)
+               {
+                       localsound(MENU_SOUND_FOCUS);
+                       menuLastFocusSoundTime = time;
+               }
+}
+
+void m_play_click_sound(string soundfile)
+{
+       if(cvar("menu_sounds"))
+               localsound(soundfile);
+}