Added a "Back to lobby" button.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@390 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -191,6 +191,10 @@ public class VenisonController
|
|||||||
// disable the noplace button
|
// disable the noplace button
|
||||||
_panel.noplace.setEnabled(false);
|
_panel.noplace.setEnabled(false);
|
||||||
|
|
||||||
|
} else if (action.getActionCommand().equals(BACK_TO_LOBBY)) {
|
||||||
|
// bail on out
|
||||||
|
_ctx.getLocationDirector().moveBack();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return super.handleAction(action);
|
return super.handleAction(action);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,12 @@ public class VenisonPanel
|
|||||||
chat.removeSendButton();
|
chat.removeSendButton();
|
||||||
sidePanel.add(chat);
|
sidePanel.add(chat);
|
||||||
|
|
||||||
|
// add a "back" button
|
||||||
|
JButton back = new JButton("Back to lobby");
|
||||||
|
back.setActionCommand(BACK_TO_LOBBY);
|
||||||
|
back.addActionListener(Controller.DISPATCHER);
|
||||||
|
sidePanel.add(back, VGroupLayout.FIXED);
|
||||||
|
|
||||||
// add our side panel to the main display
|
// add our side panel to the main display
|
||||||
add(sidePanel, HGroupLayout.FIXED);
|
add(sidePanel, HGroupLayout.FIXED);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: AtlantiCodes.java,v 1.3 2001/10/17 23:27:52 mdb Exp $
|
// $Id: AtlantiCodes.java,v 1.4 2001/10/24 03:24:20 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.venison;
|
package com.threerings.venison;
|
||||||
|
|
||||||
@@ -34,4 +34,8 @@ public interface VenisonCodes
|
|||||||
/** The message submitted by the client to the server when they decide
|
/** The message submitted by the client to the server when they decide
|
||||||
* that they don't want to (or can't) place any piecen this turn. */
|
* that they don't want to (or can't) place any piecen this turn. */
|
||||||
public static final String PLACE_NOTHING_REQUEST = "place_nothing";
|
public static final String PLACE_NOTHING_REQUEST = "place_nothing";
|
||||||
|
|
||||||
|
/** The name of the command posted by the "Back to lobby" button in
|
||||||
|
* the side bar. */
|
||||||
|
public static final String BACK_TO_LOBBY = "back_to_lobby";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user