summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-31 20:16:39 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-31 20:16:39 +0300
commit35d4ce0ed75b2575067007a85d5c211d292ebada (patch)
treee5749655db88531768635586e52508cefdfd8a5a /src/gui
parent8f52bfee633b4aa2f7e49c1e16428d8f1c03fcfc (diff)
downloadplus-35d4ce0ed75b2575067007a85d5c211d292ebada.tar.gz
plus-35d4ce0ed75b2575067007a85d5c211d292ebada.tar.bz2
plus-35d4ce0ed75b2575067007a85d5c211d292ebada.tar.xz
plus-35d4ce0ed75b2575067007a85d5c211d292ebada.zip
Rename SoundManager sigleton from sound to soundManager.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/confirmdialog.cpp2
-rw-r--r--src/gui/npcdialog.cpp2
-rw-r--r--src/gui/okdialog.cpp4
-rw-r--r--src/gui/quitdialog.cpp4
-rw-r--r--src/gui/setup_audio.cpp12
-rw-r--r--src/gui/shopwindow.cpp2
-rw-r--r--src/gui/widgets/chattab.cpp8
-rw-r--r--src/gui/widgets/guildchattab.cpp2
-rw-r--r--src/gui/widgets/setupitem.cpp2
-rw-r--r--src/gui/widgets/window.cpp4
10 files changed, 21 insertions, 21 deletions
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index e78be195c..3fef0d5bc 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -99,7 +99,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
}
setVisible(true);
yesButton->requestFocus();
- sound.playGuiSound(SOUND_REQUEST);
+ soundManager.playGuiSound(SOUND_REQUEST);
}
void ConfirmDialog::action(const gcn::ActionEvent &event)
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index c2de9b1ad..32f17ecbd 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -154,7 +154,7 @@ NpcDialog::NpcDialog(const int npcId) :
setVisible(true);
requestFocus();
enableVisibleSound(true);
- sound.playGuiSound(SOUND_SHOW_WINDOW);
+ soundManager.playGuiSound(SOUND_SHOW_WINDOW);
if (actorSpriteManager)
{
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index ae0c4ca4a..243805538 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -77,9 +77,9 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
okButton->requestFocus();
if (soundEvent == DIALOG_OK)
- sound.playGuiSound(SOUND_INFO);
+ soundManager.playGuiSound(SOUND_INFO);
else if (soundEvent == DIALOG_ERROR)
- sound.playGuiSound(SOUND_ERROR);
+ soundManager.playGuiSound(SOUND_ERROR);
}
void OkDialog::action(const gcn::ActionEvent &event)
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index 3bf63c9a1..76937b936 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -114,7 +114,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe):
reflowLayout(200, 0);
setLocationRelativeTo(getParent());
setVisible(true);
- sound.playGuiSound(SOUND_SHOW_WINDOW);
+ soundManager.playGuiSound(SOUND_SHOW_WINDOW);
// enableVisibleSound(true);
requestModalFocus();
mOkButton->requestFocus();
@@ -144,7 +144,7 @@ void QuitDialog::placeOption(ContainerPlacer &placer,
void QuitDialog::action(const gcn::ActionEvent &event)
{
- sound.playGuiSound(SOUND_HIDE_WINDOW);
+ soundManager.playGuiSound(SOUND_HIDE_WINDOW);
if (event.getId() == "ok")
{
if (viewport)
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp
index ea3a46a86..9209bc731 100644
--- a/src/gui/setup_audio.cpp
+++ b/src/gui/setup_audio.cpp
@@ -77,10 +77,10 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
"playGuiSound", this, "playGuiSoundEvent");
new SetupItemSlider(_("Sfx volume"), "", "sfxVolume",
- this, "sfxVolumeEvent", 0, sound.getMaxVolume(), 150, true);
+ this, "sfxVolumeEvent", 0, soundManager.getMaxVolume(), 150, true);
new SetupItemSlider(_("Music volume"), "", "musicVolume",
- this, "musicVolumeEvent", 0, sound.getMaxVolume(), 150, true);
+ this, "musicVolumeEvent", 0, soundManager.getMaxVolume(), 150, true);
new SetupItemCheckBox(_("Enable music fade out"), "",
"fadeoutmusic", this, "fadeoutmusicEvent");
@@ -156,20 +156,20 @@ void Setup_Audio::apply()
SetupTabScroll::apply();
if (config.getBoolValue("sound"))
{
- sound.init();
+ soundManager.init();
if (viewport && config.getBoolValue("playMusic"))
{
const Map *const map = viewport->getMap();
if (map)
- sound.playMusic(map->getMusicFile());
+ soundManager.playMusic(map->getMusicFile());
}
else
{
- sound.stopMusic();
+ soundManager.stopMusic();
}
}
else
{
- sound.close();
+ soundManager.close();
}
}
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 17f9edc5b..0119bc68b 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -756,7 +756,7 @@ void ShopWindow::processRequest(std::string nick, std::string data,
if (config.getBoolValue("autoShop"))
{
- sound.playGuiSound(SOUND_TRADE);
+ soundManager.playGuiSound(SOUND_TRADE);
startTrade();
}
else
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index f219bb661..31ae6a84b 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -289,7 +289,7 @@ void ChatTab::chatLog(std::string line, Own own,
if (chatWindow && chatWindow->findHighlight(tmp.text))
{
setFlash(2);
- sound.playGuiSound(SOUND_HIGHLIGHT);
+ soundManager.playGuiSound(SOUND_HIGHLIGHT);
}
else
{
@@ -299,7 +299,7 @@ void ChatTab::chatLog(std::string line, Own own,
else if (getFlash() == 2)
{
if (chatWindow && chatWindow->findHighlight(tmp.text))
- sound.playGuiSound(SOUND_HIGHLIGHT);
+ soundManager.playGuiSound(SOUND_HIGHLIGHT);
}
}
@@ -312,7 +312,7 @@ void ChatTab::chatLog(std::string line, Own own,
{
if (chatWindow)
chatWindow->unHideWindow();
- sound.playGuiSound(SOUND_GLOBAL);
+ soundManager.playGuiSound(SOUND_GLOBAL);
}
else if (own != BY_SERVER)
{
@@ -510,7 +510,7 @@ void ChatTab::addNewRow(std::string &line)
void ChatTab::playNewMessageSound()
{
- sound.playGuiSound(SOUND_WHISPER);
+ soundManager.playGuiSound(SOUND_WHISPER);
}
void ChatTab::showOnline(const std::string &nick,
diff --git a/src/gui/widgets/guildchattab.cpp b/src/gui/widgets/guildchattab.cpp
index 5917fbda4..bb85e1a5b 100644
--- a/src/gui/widgets/guildchattab.cpp
+++ b/src/gui/widgets/guildchattab.cpp
@@ -134,7 +134,7 @@ void GuildChatTab::saveToLogFile(std::string &msg)
void GuildChatTab::playNewMessageSound()
{
- sound.playGuiSound(SOUND_GUILD);
+ soundManager.playGuiSound(SOUND_GUILD);
}
void GuildChatTab::optionChanged(const std::string &value)
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index fbb24d2b6..54e1102a6 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -1037,7 +1037,7 @@ void SetupItemSound::action(const gcn::ActionEvent &event)
{
if (mSlider->getSelected())
{
- sound.playGuiSfx(branding.getStringValue("systemsounds")
+ soundManager.playGuiSfx(branding.getStringValue("systemsounds")
.append(mSlider->getSelectedString()).append(".ogg"));
}
}
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 54ed4764f..63c5b6629 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -578,7 +578,7 @@ void Window::setVisible(bool visible, bool forceSticky)
if (visible)
{
if (mPlayVisibleSound)
- sound.playGuiSound(SOUND_SHOW_WINDOW);
+ soundManager.playGuiSound(SOUND_SHOW_WINDOW);
if (gui)
{
gcn::MouseEvent *event = reinterpret_cast<gcn::MouseEvent*>(
@@ -599,7 +599,7 @@ void Window::setVisible(bool visible, bool forceSticky)
else
{
if (mPlayVisibleSound)
- sound.playGuiSound(SOUND_HIDE_WINDOW);
+ soundManager.playGuiSound(SOUND_HIDE_WINDOW);
}
}