[2581] | 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 | |
---|
[2018] | 26 | #include "orxonox_gui_audio.h" |
---|
| 27 | |
---|
[2588] | 28 | /** |
---|
| 29 | \brief Creates an Audio-Frame |
---|
| 30 | */ |
---|
[3315] | 31 | OrxonoxGuiAudio::OrxonoxGuiAudio(void) |
---|
[2018] | 32 | { |
---|
[3315] | 33 | this->audioFrame = new Frame("Audio-Options:"); |
---|
| 34 | this->audioBox = new Box('v'); |
---|
| 35 | this->audioFrame->setGroupName("audio"); |
---|
[2018] | 36 | |
---|
[3315] | 37 | this->enableSound = new CheckButton("Disable Sound"); |
---|
| 38 | this->enableSound->setFlagName ("no-sound", 0); |
---|
| 39 | this->enableSound->saveability(); |
---|
| 40 | this->audioBox->fill(this->enableSound); |
---|
| 41 | Label* musicVolumeLabel = new Label("Music Volume"); |
---|
| 42 | this->audioBox->fill(musicVolumeLabel); |
---|
| 43 | this->musicVolume = new Slider("Music Volume", 0, 100); |
---|
| 44 | this->musicVolume->setFlagName("music-volume", "m", 80); |
---|
| 45 | this->musicVolume->saveability(); |
---|
| 46 | this->audioBox->fill (this->musicVolume); |
---|
[2018] | 47 | Label* effectsVolumeLabel = new Label ("Effects Volume"); |
---|
[3315] | 48 | this->audioBox->fill (effectsVolumeLabel); |
---|
| 49 | this->effectsVolume = new Slider ("Effects Volume", 0, 100); |
---|
| 50 | this->effectsVolume->setFlagName ("effects-volume", "e", 80); |
---|
| 51 | this->effectsVolume->saveability(); |
---|
| 52 | this->audioBox->fill (this->effectsVolume); |
---|
[2018] | 53 | |
---|
[3315] | 54 | this->audioFrame->fill (this->audioBox); |
---|
[2018] | 55 | } |
---|
| 56 | |
---|
[2588] | 57 | /** |
---|
| 58 | \brief Return the Frame |
---|
| 59 | \return Returns the Audio-frame |
---|
| 60 | */ |
---|
[3315] | 61 | Widget* OrxonoxGuiAudio::getWidget(void) |
---|
[2018] | 62 | { |
---|
[3315] | 63 | return this->audioFrame; |
---|
[2018] | 64 | } |
---|