30 lines
726 B
Java
30 lines
726 B
Java
package gui.menu;
|
|
|
|
import gui.Options;
|
|
import gui.Symbols;
|
|
import imgui.ImGui;
|
|
import imgui.type.ImInt;
|
|
|
|
public class OptionsMenu extends BaseView {
|
|
|
|
private ImInt currentValue = new ImInt();
|
|
private float backgroundSpeed[] = new float[]{Options.BackgroundSpeed};
|
|
|
|
public OptionsMenu(StateMachine stateMachine) {
|
|
super(stateMachine);
|
|
}
|
|
|
|
@Override
|
|
public void render() {
|
|
ImGui.text("Options");
|
|
if(ImGui.combo("Jeu de symboles", currentValue, Symbols.getSymbolsNames())){
|
|
Options.Symboles = Symbols.values()[currentValue.get()];
|
|
}
|
|
if(ImGui.sliderFloat("Vitesse d'animation de l'arrière plan", backgroundSpeed, 0.0f, 10.0f)){
|
|
Options.BackgroundSpeed = backgroundSpeed[0];
|
|
}
|
|
renderReturnButton();
|
|
}
|
|
|
|
}
|