Add sound volume controls to ingame menu
[oweals/minetest.git] / src / guiVolumeChange.h
1 /*
2 Part of Minetest-c55
3 Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
4 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
5 Copyright (C) 2013 RealBadAngel, Maciej Kasatkin <mk@realbadangel.pl>
6
7 Permission to use, copy, modify, and distribute this software for any
8 purpose with or without fee is hereby granted, provided that the above
9 copyright notice and this permission notice appear in all copies.
10
11 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 #ifndef GUIVOLUMECHANGE_HEADER
21 #define GUIVOLUMECHANGE_HEADER
22
23 #include "irrlichttypes_extrabloated.h"
24 #include "modalMenu.h"
25 #include "client.h"
26 #include <string>
27
28 class GUIVolumeChange : public GUIModalMenu
29 {
30 public:
31         GUIVolumeChange(gui::IGUIEnvironment* env,
32                         gui::IGUIElement* parent, s32 id,
33                         IMenuManager *menumgr,
34                         Client* client);
35         ~GUIVolumeChange();
36         
37         void removeChildren();
38         /*
39                 Remove and re-add (or reposition) stuff
40         */
41         void regenerateGui(v2u32 screensize);
42
43         void drawMenu();
44
45         bool OnEvent(const SEvent& event);
46         
47 private:
48         Client* m_client;
49
50 };
51
52 #endif
53