I have a patch now which fixes a few problems with scrolling maps using
the scroll wheel, viz.:
1. The scroll increment is adjustible.
2. The wheel scrolls horizontally when hovering over the horizontal
scroll bar, or when hovering over the map with CTRL depressed.
Not being able to use the wheel effectively was driving me to distraction;
hopefully this will appear in the next release.
I'd like to elicit some comments on this:
First, I'd like to hear people's opinions on whether it would be of value to
have scroll speed be a module-specific preference insteald of a global
preference.
Second, I'd like to hear from someone who knows better than I do what
the proper method of getting a preference from within VASSAL.build.module.Map
is. Here's what I did:
IntConfigurer mwsconfig = new IntConfigurer(MOUSE_WHEEL_SPEED,
"Mouse scroll wheel increment (pixels)", new Integer(50));
mwsconfig.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals(MOUSE_WHEEL_SPEED))
mouseWheelSpeed = ((Integer) e.getNewValue()).intValue();
}
});
GameModule.getGameModule().getPrefs().addOption("General", mwsconfig);
It looked to me like the listener provided by the Map.getPropertyListener()
method and the globalProperties hash should already be handling this, but I
wasn't able to do it that way and never determined why not.
--
J.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vassalengine/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/vassalengine/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/