From 89e59b2f2c65234bafc34e1360feabdcec367b01 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Sun, 29 May 2011 15:32:01 +0200 Subject: Implemented initial meld threshold in settings control git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@296 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/SettingsControl.java | 18 ++++++++++++++++-- 1 file 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() { + @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() { -- cgit v1.2.3