| 1 |
/* |
| 2 |
=========================================================================== |
| 3 |
Copyright (C) 2007 Open Arena Team |
| 4 |
|
| 5 |
This file is part of Open Arena. |
| 6 |
|
| 7 |
Open Arena is free software; you can redistribute it |
| 8 |
and/or modify it under the terms of the GNU General Public License as |
| 9 |
published by the Free Software Foundation; either version 2 of the License, |
| 10 |
or (at your option) any later version. |
| 11 |
|
| 12 |
Open Arena is distributed in the hope that it will be |
| 13 |
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with Open Arena; if not, write to the Free Software |
| 19 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
=========================================================================== |
| 21 |
*/ |
| 22 |
|
| 23 |
#include "ui/menudef.h" |
| 24 |
|
| 25 |
{ |
| 26 |
menuDef { |
| 27 |
name "audio" |
| 28 |
visible 0 |
| 29 |
fullscreen 1 |
| 30 |
background MP_BACKGROUND |
| 31 |
focusColor MP_FOCUSCOLOR |
| 32 |
rect 0 0 640 480 |
| 33 |
outOfBoundsClick |
| 34 |
style 0 |
| 35 |
onOpen { } |
| 36 |
onEsc { |
| 37 |
close audio; |
| 38 |
open configuration; |
| 39 |
} |
| 40 |
|
| 41 |
itemDef { |
| 42 |
name titleness |
| 43 |
text "Audio" |
| 44 |
style 0 |
| 45 |
type 0 |
| 46 |
textstyle 6 |
| 47 |
textscale 1 |
| 48 |
rect 0 65 1 1 |
| 49 |
textalign 0 |
| 50 |
textalignx 48 |
| 51 |
textaligny 40 |
| 52 |
forecolor MP_TITLECOLOR |
| 53 |
visible 1 |
| 54 |
} |
| 55 |
|
| 56 |
// The Bar of Buttons |
| 57 |
|
| 58 |
itemDef { |
| 59 |
name button1 |
| 60 |
text "Apply" |
| 61 |
style 0 |
| 62 |
type 1 |
| 63 |
textstyle 3 |
| 64 |
textscale 0.3 |
| 65 |
rect 52 145 163 34 |
| 66 |
textalign 0 |
| 67 |
textalignx 5 |
| 68 |
textaligny 20 |
| 69 |
backcolor 0 0 0 0 |
| 70 |
forecolor MP_TEXTCOLOR |
| 71 |
visible 1 |
| 72 |
action |
| 73 |
{ |
| 74 |
play "ui/assets/select.wav"; |
| 75 |
exec "snd_restart"; |
| 76 |
open configuration; |
| 77 |
close audio; |
| 78 |
} |
| 79 |
} |
| 80 |
|
| 81 |
itemDef { |
| 82 |
name button2 |
| 83 |
text "Done" |
| 84 |
style 0 |
| 85 |
type 1 |
| 86 |
textstyle 3 |
| 87 |
textscale 0.3 |
| 88 |
rect 52 177 163 34 |
| 89 |
textalign 0 |
| 90 |
textalignx 5 |
| 91 |
textaligny 20 |
| 92 |
forecolor MP_TEXTCOLOR |
| 93 |
visible 1 |
| 94 |
action |
| 95 |
{ |
| 96 |
play "ui/assets/select.wav"; |
| 97 |
open configuration; |
| 98 |
close audio; |
| 99 |
} |
| 100 |
} |
| 101 |
// the audio controls |
| 102 |
|
| 103 |
itemDef { |
| 104 |
name volume |
| 105 |
style 0 |
| 106 |
text "Sound volume" |
| 107 |
style 0 |
| 108 |
type 0 |
| 109 |
textstyle 6 |
| 110 |
textscale .25 |
| 111 |
rect 212 137 1 1 |
| 112 |
textalign 0 |
| 113 |
textalignx 6 |
| 114 |
textaligny 18 |
| 115 |
forecolor MP_TEXTCOLOR |
| 116 |
visible 1 |
| 117 |
} |
| 118 |
itemDef { |
| 119 |
name settin |
| 120 |
style 0 |
| 121 |
type ITEM_TYPE_SLIDER |
| 122 |
text "" |
| 123 |
cvarfloat "s_volume" 0.7 0 1 |
| 124 |
background "ui/assets/scrollbar" |
| 125 |
textstyle 6 |
| 126 |
textscale .24 |
| 127 |
rect 212 166 150 24 |
| 128 |
textalign 0 |
| 129 |
textalignx 6 |
| 130 |
textaligny 18 |
| 131 |
forecolor MP_TEXTCOLOR |
| 132 |
backcolor 0.0 0.0 0.0 1 |
| 133 |
outlinecolor 1 0.5 0.01 0.3 |
| 134 |
visible 1 |
| 135 |
} |
| 136 |
|
| 137 |
|
| 138 |
// MAX PRAYERS |
| 139 |
itemDef { |
| 140 |
name maxprayamer |
| 141 |
style 0 |
| 142 |
text "Music volume:" |
| 143 |
style 0 |
| 144 |
type 0 |
| 145 |
textstyle 6 |
| 146 |
textscale .25 |
| 147 |
rect 212 200 1 1 |
| 148 |
textalign 0 |
| 149 |
textalignx 6 |
| 150 |
textaligny 18 |
| 151 |
forecolor MP_TEXTCOLOR |
| 152 |
visible 1 |
| 153 |
} |
| 154 |
itemDef { |
| 155 |
name mussic |
| 156 |
style 0 |
| 157 |
type ITEM_TYPE_SLIDER |
| 158 |
text "" |
| 159 |
cvarfloat "s_musicvolume" 0.25 0 1 |
| 160 |
background "ui/assets/scrollbar" |
| 161 |
textstyle 6 |
| 162 |
textscale .24 |
| 163 |
rect 212 229 150 24 |
| 164 |
textalign 0 |
| 165 |
textalignx 6 |
| 166 |
textaligny 18 |
| 167 |
|
| 168 |
forecolor MP_TEXTCOLOR |
| 169 |
backcolor 0.0 0.0 0.0 1 |
| 170 |
outlinecolor 1 0.5 0.01 0.3 |
| 171 |
visible 1 |
| 172 |
} |
| 173 |
// other buttons |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
itemDef { |
| 178 |
name openal |
| 179 |
style 0 |
| 180 |
text "Use OpenAL:" |
| 181 |
cvar "s_useOpenAL" |
| 182 |
type ITEM_TYPE_YESNO |
| 183 |
textstyle 6 |
| 184 |
textscale .24 |
| 185 |
rect 212 287 150 24 |
| 186 |
textalign 0 |
| 187 |
textalignx 6 |
| 188 |
textaligny 18 |
| 189 |
forecolor MP_TEXTCOLOR |
| 190 |
visible 1 |
| 191 |
} |
| 192 |
|
| 193 |
|
| 194 |
// other buttons |
| 195 |
|
| 196 |
itemDef { |
| 197 |
name sndrate |
| 198 |
|
| 199 |
text "Rate:" |
| 200 |
type ITEM_TYPE_MULTI |
| 201 |
cvar "s_khz" |
| 202 |
cvarFloatList { "48000Hz" 48 "44100Hz" 44 "22050Hz" 22 "11025Hz" 11 } |
| 203 |
textstyle 6 |
| 204 |
textscale .24 |
| 205 |
rect 212 310 150 24 |
| 206 |
textalign ITEM_ALIGN_RIGHT |
| 207 |
textalign 0 |
| 208 |
textalignx 6 |
| 209 |
textaligny 20 |
| 210 |
forecolor MP_TEXTCOLOR |
| 211 |
visible 1 |
| 212 |
} |
| 213 |
|
| 214 |
|
| 215 |
} |