diff --git a/src/games/strategy/triplea/ui/TripleAFrame.java b/src/games/strategy/triplea/ui/TripleAFrame.java index 468be7349a4..da6134ca6d0 100644 --- a/src/games/strategy/triplea/ui/TripleAFrame.java +++ b/src/games/strategy/triplea/ui/TripleAFrame.java @@ -1745,14 +1745,14 @@ public void run() { } }; final KeyListener m_arrowKeyActionListener = new KeyListener() { - final int diffPixel = 50; - @Override public void keyPressed(final KeyEvent e) { // scroll map according to wasd/arrowkeys + final int diffPixel = computeScrollSpeed(e); final int x = m_mapPanel.getXOffset(); final int y = m_mapPanel.getYOffset(); final int keyCode = e.getKeyCode(); + if (keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_D) { getMapPanel().setTopLeft(x + diffPixel, y); } else if (keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_A) { @@ -1818,6 +1818,17 @@ public void keyTyped(final KeyEvent e) {} public void keyReleased(final KeyEvent e) {} }; + private static int computeScrollSpeed(final KeyEvent e) { + int multiplier = 1; + + if (e.isControlDown()) { + multiplier = 5; + } + + final int starterDiffPixel = 100; + return (starterDiffPixel * multiplier); + } + private void showEditMode() { m_tabsPanel.addTab("Edit", m_editPanel); if (m_editDelegate != null) { diff --git a/src/games/strategy/triplea/ui/TripleaMenu.java b/src/games/strategy/triplea/ui/TripleaMenu.java index a215e27e0f2..ee4177e0252 100644 --- a/src/games/strategy/triplea/ui/TripleaMenu.java +++ b/src/games/strategy/triplea/ui/TripleaMenu.java @@ -147,7 +147,7 @@ public void actionPerformed(final ActionEvent e) { + "CTRL-Left click on a territory to select the territory as a way point (this will force the units to move through this territory on their way to the destination).
" + "
Moving the Map Screen
" + "Right click and Drag the mouse to move your screen over the map.
" - + "Left click on the map (anywhere), then use the Arrow Keys (or WASD) to move your map around.
" + + "Left click the map (anywhere), use the arrow keys (or WASD keys) to move your map around. Holding down control will move the map faster.
" + "Left click in the Minimap at the top right of the screen, and Drag the mouse.
" + "Move the mouse to the edge of the map window, and the screen will scroll in that direction.
" + "Scrolling the mouse wheel will move the map up and down.
" + "
Zooming Out
"