commands, camera, messages, overlay, ..
This commit is contained in:
parent
75f91dbf4c
commit
d45cd7ec2c
126 changed files with 854 additions and 628 deletions
37
java/src/game/gui/options/GuiSound.java
Normal file
37
java/src/game/gui/options/GuiSound.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package game.gui.options;
|
||||
|
||||
import game.audio.Volume;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
|
||||
public class GuiSound extends GuiOptions {
|
||||
protected GuiSound() {
|
||||
}
|
||||
|
||||
public void init(int width, int height) {
|
||||
this.addSelector("snd_enabled", 30, 380, 440, 24);
|
||||
|
||||
this.addSelector("snd_buffer_size", 30, 420, 440, 24);
|
||||
this.addSelector("snd_frame_size", 490, 420, 440, 24);
|
||||
|
||||
this.add(new ActButton(30, 480, 900, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, Mode action) {
|
||||
GuiSound.this.gm.restartSound(false);
|
||||
}
|
||||
}, "Übernehmen und Audio-Thread neu starten"));
|
||||
|
||||
int x = 30;
|
||||
int y = 220;
|
||||
for(Volume volume : Volume.values()) {
|
||||
this.addSelector(volume.getCVarName(), x, y, 440, 24);
|
||||
x = (x == 30) ? 490 : 30;
|
||||
if(x == 30)
|
||||
y += 40;
|
||||
}
|
||||
super.init(width, height);
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return "Audio und Ton";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue