]> 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 e9f3538ff5d2ec968f6c270a4441b5da31d9d1eb..e348796a0f89747b89e16fa315684d4ae0edddc7 100644 (file)
@@ -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);
+}