aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiVolumeChange.cpp
diff options
context:
space:
mode:
authorHugues Ross <hugues.ross@gmail.com>2020-04-11 16:39:30 -0400
committerGitHub <noreply@github.com>2020-04-11 21:39:30 +0100
commitf780bae05cc2fdd23a6d7326c770783da8d94ea3 (patch)
tree31d7e764d86e9f5731c3d3a4e35c598cdc7f777c /src/gui/guiVolumeChange.cpp
parentba3587e7769113fed9a076ae2e4d2153686fb163 (diff)
downloadminetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.tar.gz
minetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.tar.bz2
minetest-f780bae05cc2fdd23a6d7326c770783da8d94ea3.zip
Formspecs: Add state-selection to style elements (#9378)
Diffstat (limited to 'src/gui/guiVolumeChange.cpp')
-rw-r--r--src/gui/guiVolumeChange.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/guiVolumeChange.cpp b/src/gui/guiVolumeChange.cpp
index 9428cde83..07b11248c 100644
--- a/src/gui/guiVolumeChange.cpp
+++ b/src/gui/guiVolumeChange.cpp
@@ -38,9 +38,10 @@ const int ID_soundMuteButton = 266;
GUIVolumeChange::GUIVolumeChange(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
- IMenuManager *menumgr
+ IMenuManager *menumgr, ISimpleTextureSource *tsrc
):
- GUIModalMenu(env, parent, id, menumgr)
+ GUIModalMenu(env, parent, id, menumgr),
+ m_tsrc(tsrc)
{
}
@@ -104,7 +105,7 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
core::rect<s32> rect(0, 0, 80 * s, 30 * s);
rect = rect + v2s32(size.X / 2 - 80 * s / 2, size.Y / 2 + 55 * s);
const wchar_t *text = wgettext("Exit");
- GUIButton::addButton(Environment, rect, this, ID_soundExitButton, text);
+ GUIButton::addButton(Environment, rect, m_tsrc, this, ID_soundExitButton, text);
delete[] text;
}
{