commands, camera, messages, overlay, ..

This commit is contained in:
Sen 2025-03-26 12:22:32 +01:00
parent 75f91dbf4c
commit d45cd7ec2c
126 changed files with 854 additions and 628 deletions

View 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";
}
}