summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jrummikub/control/SettingsControl.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/jrummikub/control/SettingsControl.java b/src/jrummikub/control/SettingsControl.java
index b294cae..17a1dbf 100644
--- a/src/jrummikub/control/SettingsControl.java
+++ b/src/jrummikub/control/SettingsControl.java
@@ -50,6 +50,22 @@ public class SettingsControl {
* Start the operation of the settings control
*/
public void startSettings() {
+ view.getSettingsPanel().setInitialMeldThreshold(settings.getInitialMeldThreshold());
+
+ view.getSettingsPanel().getChangeInitialMeldThresholdEvent().add(new IListener1<Integer>() {
+ @Override
+ public void handle(Integer value) {
+ settings.setInitialMeldThreshold(value);
+ update();
+ }
+ });
+
+ addPlayerSettingsListeners();
+
+ view.showSettingsPanel(true);
+ }
+
+ private void addPlayerSettingsListeners() {
view.getSettingsPanel().getStartGameEvent().add(new IListener() {
@Override
public void handle() {
@@ -83,8 +99,6 @@ public class SettingsControl {
setPlayerName(i, name);
}
});
-
- view.showSettingsPanel(true);
}
private void addPlayer() {