]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gui/guiEngine.cpp
Android: Replace movement buttons with joystick (#7126)
[dragonfireclient.git] / src / gui / guiEngine.cpp
index e9b4e54c19c8e1d8a86806f685097de6e7a91de7..67ab6437d27ba64bf5a56199b675ef44dcefb4d4 100644 (file)
@@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "settings.h"
 #include "guiMainMenu.h"
 #include "sound.h"
-#include "sound_openal.h"
+#include "client/sound_openal.h"
 #include "clouds.h"
 #include "httpfetch.h"
 #include "log.h"
@@ -137,7 +137,8 @@ GUIEngine::GUIEngine(JoystickController *joystick,
        //create soundmanager
        MenuMusicFetcher soundfetcher;
 #if USE_SOUND
-       m_sound_manager = createOpenALSoundManager(&soundfetcher);
+       if (g_settings->getBool("enable_sound"))
+               m_sound_manager = createOpenALSoundManager(g_sound_manager_singleton.get(), &soundfetcher);
 #endif
        if(!m_sound_manager)
                m_sound_manager = &dummySoundManager;
@@ -149,9 +150,8 @@ GUIEngine::GUIEngine(JoystickController *joystick,
                g_fontengine->getTextHeight());
        rect += v2s32(4, 0);
 
-       m_irr_toplefttext =
-               addStaticText(RenderingEngine::get_gui_env(), m_toplefttext,
-                       rect, false, true, 0, -1);
+       m_irr_toplefttext = gui::StaticText::add(RenderingEngine::get_gui_env(),
+                       m_toplefttext, rect, false, true, 0, -1);
 
        //create formspecsource
        m_formspecgui = new FormspecFormSource("");
@@ -165,6 +165,7 @@ GUIEngine::GUIEngine(JoystickController *joystick,
                        m_texture_source,
                        m_formspecgui,
                        m_buttonhandler,
+                       "",
                        false);
 
        m_menu->allowClose(false);
@@ -560,9 +561,8 @@ void GUIEngine::updateTopLeftTextSize()
        rect += v2s32(4, 0);
 
        m_irr_toplefttext->remove();
-       m_irr_toplefttext =
-               addStaticText(RenderingEngine::get_gui_env(), m_toplefttext,
-                       rect, false, true, 0, -1);
+       m_irr_toplefttext = gui::StaticText::add(RenderingEngine::get_gui_env(),
+                       m_toplefttext, rect, false, true, 0, -1);
 }
 
 /******************************************************************************/