Nr.10 edited 'Menu','Sound','battlship.properties' and 'battleship_de.properties'
edited the property files to ensure, that in the menu the background music on/off and the background volume slider are named in eng and german, edited the childnotes for the menu, so the checkbox and slider are visible, edited the enum Suonds, for another entry 'BACKGROUNDMUSIC'
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
import com.simsilica.lemur.Button;
|
||||
import com.simsilica.lemur.Checkbox;
|
||||
import com.simsilica.lemur.Label;
|
||||
import com.simsilica.lemur.Slider;
|
||||
import com.simsilica.lemur.style.ElementId;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.dialog.StateCheckboxModel;
|
||||
@@ -34,6 +35,7 @@ class Menu extends Dialog {
|
||||
private final Button loadButton = new Button(lookup("menu.map.load"));
|
||||
private final Button saveButton = new Button(lookup("menu.map.save"));
|
||||
|
||||
|
||||
/**
|
||||
* Constructs the Menu dialog for the Battleship application.
|
||||
*
|
||||
@@ -45,6 +47,9 @@ public Menu(BattleshipApp app) {
|
||||
addChild(new Label(lookup("battleship.name"), new ElementId("header"))); //NON-NLS
|
||||
addChild(new Checkbox(lookup("menu.sound-enabled"),
|
||||
new StateCheckboxModel(app, GameSound.class)));
|
||||
addChild(new Checkbox(lookup("background.music.checkbox")));
|
||||
addChild(new Label(lookup("background.music.volume")));
|
||||
addChild(new Slider(lookup("background.music.volume")));
|
||||
addChild(loadButton)
|
||||
.addClickCommands(s -> ifTopDialog(this::loadDialog));
|
||||
addChild(saveButton)
|
||||
@@ -53,6 +58,7 @@ public Menu(BattleshipApp app) {
|
||||
.addClickCommands(s -> ifTopDialog(this::close));
|
||||
addChild(new Button(lookup("menu.quit")))
|
||||
.addClickCommands(s -> ifTopDialog(app::closeApp));
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user