summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 15:32:01 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 15:32:01 +0200
commit89e59b2f2c65234bafc34e1360feabdcec367b01 (patch)
tree4f0300d9c39d2f00f7b28caf4a98dc412b3df350 /src
parent09aa507e3b3d08cc168077c093c6ad264bdc4e8f (diff)
downloadJRummikub-89e59b2f2c65234bafc34e1360feabdcec367b01.tar
JRummikub-89e59b2f2c65234bafc34e1360feabdcec367b01.zip
Implemented initial meld threshold in settings control
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@296 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-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() {