From 20afba1adc84dd0e859605250c5a44a111045c2b Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 18 Feb 2012 22:47:30 +0100 Subject: Added notification sound on receiving whisper One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling --- src/gui/gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 2f24d009..78fc42fb 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -29,6 +29,7 @@ #include "gui/widgets/window.h" #include "gui/widgets/windowcontainer.h" +#include "client.h" #include "configuration.h" #include "eventlistener.h" #include "graphics.h" @@ -204,7 +205,7 @@ void Gui::draw() int mouseX, mouseY; Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); - if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) + if ((Client::hasMouseFocus() || button & SDL_BUTTON(1)) && mCustomCursor && mMouseCursorAlpha > 0.0f) { -- cgit v1.2.3-70-g09d2