Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/guiMerge/src/lib/gui/gui/orxonox_gui_audio.cc @ 4046

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

orxonox/branches/guiMerge: heavy clean-up of the gui

File size: 2.3 KB
Line 
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*/
31OrxonoxGuiAudio::OrxonoxGuiAudio(void)
32{
33  Frame* audioFrame;        //!< The Frame that holds the audio Options.
34  Box* audioBox;            //!< The Box that holds the audio Options.
35  CheckButton* enableSound; //!< A Ckeckbutton for enabling Sound.
36  Slider* musicVolume;      //!< A Slider for music volume.
37  Slider* effectsVolume;    //!< A Slider for effects volume.
38
39  audioFrame = new Frame("Audio-Options:");
40  audioFrame->setGroupName("audio");
41  {
42    audioBox = new Box('v');
43    {
44     
45      enableSound = new CheckButton("Disable Sound");
46      enableSound->setFlagName ("no-sound", 0);
47      enableSound->saveability();
48      audioBox->fill(enableSound);
49      Label* musicVolumeLabel = new Label("Music Volume");
50      audioBox->fill(musicVolumeLabel);
51      musicVolume = new Slider("Music Volume", 0, 100);
52      musicVolume->setFlagName("music-volume", "m", 80);
53      musicVolume->saveability();
54      audioBox->fill (musicVolume);
55      Label* effectsVolumeLabel = new Label ("Effects Volume");
56      audioBox->fill (effectsVolumeLabel);
57      effectsVolume = new Slider ("Effects Volume", 0, 100);
58      effectsVolume->setFlagName ("effects-volume", "e", 80);
59      effectsVolume->saveability();
60      audioBox->fill (effectsVolume);
61    }
62    audioFrame->fill(audioBox);
63  }
64  setMainWidget(audioFrame);
65}
66
67/**
68    \brief Destructs the Audio-Stuff
69*/
70OrxonoxGuiAudio::~OrxonoxGuiAudio(void)
71{
72  // nothing to do here.
73}
Note: See TracBrowser for help on using the repository browser.