1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | This program is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | GNU General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU General Public License |
---|
17 | along with this program; if not, write to the Free Software Foundation, |
---|
18 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
19 | |
---|
20 | |
---|
21 | ### File Specific: |
---|
22 | main-programmer: Benjamin Grauer |
---|
23 | |
---|
24 | */ |
---|
25 | |
---|
26 | #include "orxonox_gui_audio.h" |
---|
27 | |
---|
28 | /** |
---|
29 | \brief Creates an Audio-Frame |
---|
30 | */ |
---|
31 | OrxonoxGuiAudio::OrxonoxGuiAudio () |
---|
32 | { |
---|
33 | audioFrame = new Frame ("Audio-Options:"); |
---|
34 | audioBox = new Box ('v'); |
---|
35 | |
---|
36 | enableSound = new CheckButton ("Disable Sound"); |
---|
37 | enableSound->setFlagName ("no-sound", 0); |
---|
38 | audioBox->fill (enableSound); |
---|
39 | Label* musicVolumeLabel = new Label ("Music Volume"); |
---|
40 | audioBox->fill (musicVolumeLabel); |
---|
41 | musicVolume = new Slider ("Music Volume", 0, 100); |
---|
42 | musicVolume->setFlagName ("music-volume", "m", 80); |
---|
43 | audioBox->fill (musicVolume); |
---|
44 | Label* effectsVolumeLabel = new Label ("Effects Volume"); |
---|
45 | audioBox->fill (effectsVolumeLabel); |
---|
46 | effectsVolume = new Slider ("Effects Volume", 0, 100); |
---|
47 | effectsVolume->setFlagName ("effects-volume", "e", 80); |
---|
48 | audioBox->fill (effectsVolume); |
---|
49 | |
---|
50 | audioFrame->fill (audioBox); |
---|
51 | } |
---|
52 | |
---|
53 | /** |
---|
54 | \brief Return the Frame |
---|
55 | \return Returns the Audio-frame |
---|
56 | */ |
---|
57 | Widget* OrxonoxGuiAudio::getWidget () |
---|
58 | { |
---|
59 | return audioFrame; |
---|
60 | } |
---|