Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/gui/orxonox_gui_audio.cc @ 3184

Last change on this file since 3184 was 2739, checked in by bensch, 20 years ago

orxonox/trunk/gui: modified savable rutine. now a widget has to be set saveable, otherwise it won't be saved

File size: 1.9 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 ()
32{
33  audioFrame = new Frame ("Audio-Options:");
34  audioBox = new Box ('v');
35  audioFrame->setGroupName ("audio");
36 
37  enableSound = new CheckButton ("Disable Sound");
38  enableSound->setFlagName ("no-sound", 0);
39  enableSound->saveable = true;
40  audioBox->fill (enableSound);
41  Label* musicVolumeLabel = new Label ("Music Volume");
42  audioBox->fill (musicVolumeLabel);
43  musicVolume = new Slider ("Music Volume", 0, 100);
44  musicVolume->setFlagName ("music-volume", "m", 80);
45  musicVolume->saveable = true;
46  audioBox->fill (musicVolume);
47  Label* effectsVolumeLabel = new Label ("Effects Volume");
48  audioBox->fill (effectsVolumeLabel);
49  effectsVolume = new Slider ("Effects Volume", 0, 100);
50  effectsVolume->setFlagName ("effects-volume", "e", 80);
51  effectsVolume->saveable = true;
52  audioBox->fill (effectsVolume);
53
54  audioFrame->fill (audioBox);
55}
56
57/**
58   \brief Return the Frame
59   \return Returns the Audio-frame
60*/
61Widget* OrxonoxGuiAudio::getWidget ()
62{
63  return audioFrame;
64}
Note: See TracBrowser for help on using the repository browser.