summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/GameListPanel.java7
-rw-r--r--src/jrummikub/view/impl/SettingsPanel.java7
2 files changed, 11 insertions, 3 deletions
diff --git a/src/jrummikub/view/impl/GameListPanel.java b/src/jrummikub/view/impl/GameListPanel.java
index 7324559..2d07f2e 100644
--- a/src/jrummikub/view/impl/GameListPanel.java
+++ b/src/jrummikub/view/impl/GameListPanel.java
@@ -72,8 +72,11 @@ class GameListPanel extends JPanel implements IGameListPanel {
joinButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- // TODO Auto-generated method stub
- // joinEvent.emit();
+ Object data = gameList.getSelectedValue();
+
+ if (data instanceof GameData) {
+ joinEvent.emit((GameData) data);
+ }
}
});
diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java
index 8ec9d3e..c7b6387 100644
--- a/src/jrummikub/view/impl/SettingsPanel.java
+++ b/src/jrummikub/view/impl/SettingsPanel.java
@@ -373,7 +373,8 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
private void addPlayerSettingsPanel(int i, PlayerSettings settings,
List<Type> choices) {
PlayerSettingsPanel panel = new PlayerSettingsPanel(i, settings, choices,
- settingsMode != SettingsMode.NETWORK_OFFER);
+ settingsMode != SettingsMode.NETWORK_OFFER
+ && settingsMode != SettingsMode.NETWORK_JOIN);
playerSettingsPanels.add(panel);
playerSettingsViewport.add(panel,
playerSettingsViewport.getComponentCount() - 1);
@@ -765,6 +766,10 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
addNetworkOfferButtons();
enableOptions(false);
break;
+ case NETWORK_JOIN:
+ // addNetworkJoinButtons();
+ enableOptions(false);
+ break;
}
}