From: Hendrik B. <nh...@us...> - 2010-03-27 16:32:04
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/actions In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19368/src/games/stendhal/client/actions Modified Files: SlashActionRepository.java Added Files: ClickModeAction.java Log Message: new command /clickmode to switch between single and double click for walking (fixes #2977326) Index: SlashActionRepository.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/actions/SlashActionRepository.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** SlashActionRepository.java 25 Feb 2010 11:25:25 -0000 1.30 --- SlashActionRepository.java 27 Mar 2010 16:31:55 -0000 1.31 *************** *** 31,36 **** actions.put("clear", new ClearChatLogAction()); actions.put("crash", new CrashClientAction()); ! actions.put("drop", new DropAction()); --- 31,37 ---- actions.put("clear", new ClearChatLogAction()); + actions.put("clickmode", new ClickModeAction()); actions.put("crash", new CrashClientAction()); ! actions.put("drop", new DropAction()); --- NEW FILE: ClickModeAction.java --- package games.stendhal.client.actions; import games.stendhal.client.ClientSingletonRepository; import games.stendhal.client.gui.chatlog.StandardEventLine; import games.stendhal.client.gui.wt.core.WtWindowManager; /** * switches between single click and double click * * @author hendrik */ public class ClickModeAction implements SlashAction { public boolean execute(String[] params, String remainder) { boolean doubleClick = Boolean.parseBoolean(WtWindowManager.getInstance().getProperty("ui.doubleclick", "false")); doubleClick = !doubleClick; WtWindowManager.getInstance().setProperty("ui.doubleclick", Boolean.toString(doubleClick)); if (doubleClick) { ClientSingletonRepository.getUserInterface().addEventLine(new StandardEventLine("Click mode is now set to double click.")); } else { ClientSingletonRepository.getUserInterface().addEventLine(new StandardEventLine("Click mode is now set to single click.")); } return true; } public int getMaximumParameters() { return 0; } public int getMinimumParameters() { return 0; } } |