Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gui_audio.cc @ 5298

Last change on this file since 5298 was 5298, checked in by bensch, 19 years ago

orxonox/trunk: output-issues

File size: 2.6 KB
RevLine 
[5298]1/*
[2581]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,
[5298]18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[2581]19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23
24*/
25
[4047]26#include "gui_audio.h"
[2018]27
[4049]28#include "gui_gtk.h"
29
[2588]30/**
[4836]31 *  Creates an Audio-Frame
[2588]32*/
[4746]33GuiAudio::GuiAudio()
[2018]34{
[4046]35  Frame* audioFrame;        //!< The Frame that holds the audio Options.
[2018]36
[4046]37  audioFrame = new Frame("Audio-Options:");
[4091]38  audioFrame->setGroupName(CONFIG_SECTION_AUDIO);
[4046]39  {
[4049]40    Box* audioBox;            //!< The Box that holds the audio Options.
[4046]41    audioBox = new Box('v');
42    {
[4049]43      CheckButton* enableSound; //!< A Ckeckbutton for enabling Sound.
44      Slider* musicVolume;      //!< A Slider for music volume.
45      Slider* effectsVolume;    //!< A Slider for effects volume.
[5298]46
[4091]47      enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO);
[4046]48      enableSound->setFlagName ("no-sound", 0);
[4132]49      enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox");
50      enableSound->setDefaultValue(0);
[4046]51      enableSound->saveability();
52      audioBox->fill(enableSound);
[4091]53      Label* musicVolumeLabel = new Label(CONFIG_NAME_MUSIC_VOLUME);
[4046]54      audioBox->fill(musicVolumeLabel);
[5298]55      musicVolume = new Slider(CONFIG_NAME_MUSIC_VOLUME, 0, 100);
[4046]56      musicVolume->setFlagName("music-volume", "m", 80);
[4132]57      musicVolume->setDescription("Sets the volume of the ingame music");
[4046]58      musicVolume->saveability();
59      audioBox->fill (musicVolume);
[4091]60      Label* effectsVolumeLabel = new Label (CONFIG_NAME_EFFECTS_VOLUME);
[4046]61      audioBox->fill (effectsVolumeLabel);
[5298]62      effectsVolume = new Slider (CONFIG_NAME_EFFECTS_VOLUME, 0, 100);
[4046]63      effectsVolume->setFlagName ("effects-volume", "e", 80);
[4132]64      effectsVolume->setDescription("Sets the volune of the ingame SoundEffects");
[4046]65      effectsVolume->saveability();
66      audioBox->fill (effectsVolume);
67    }
68    audioFrame->fill(audioBox);
69  }
70  setMainWidget(audioFrame);
[2018]71}
72
[5298]73/**
[4836]74  *  Destructs the Audio-Stuff
[3423]75*/
[4746]76GuiAudio::~GuiAudio()
[3423]77{
78  // nothing to do here.
79}
Note: See TracBrowser for help on using the repository browser.