The International Simutrans Forum

 

Author Topic: PageUp / PageDown - Keys  (Read 3144 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
PageUp / PageDown - Keys
« on: January 28, 2009, 07:49:09 AM »
Currently these keys are mapped internally to [<] or [>]. Is there a reason for this behaviour?

Usually (depending on pakset) the [<][>] keys toggle zoom in and out. So the PgUp/PgDown keys inherit this. In addition, mouse wheel movement triggers zooming.

Are there strong opinions against a change here that would create separate events for PageUp/PageDown and the [<][>] keys? That means, the possibility to connect other actions with PgUp/PgDn than Zoom in/out.

I can imagine the use of the PgUp / PgDown keys here:
  • navigation in scroll lists
  • navigation in z-direction on a given tile: In current simutrans, the cursor sits only on the ground tile. A direct manipulation of the z-coordinate is not possible (sometimes one can use the [ctrl] key, which does not work intuitively for me). However, many tools support full 3d-coordinates. So a possibility to navigate along the z-axis would be benefitial imho.
« Last Edit: January 28, 2009, 10:16:20 AM by Dwachs »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: PageUp / PageDown - Keys
« Reply #1 on: January 28, 2009, 08:32:14 AM »
I like the Z-axis idea. Perhpas also CTRL+mouse wheel would be good for that, too?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: PageUp / PageDown - Keys
« Reply #2 on: January 28, 2009, 09:11:23 AM »
This is inteded as many keyboards do not have < and > easy accessible. For instance if you have german mapping on japanese keyboard, those keys are unaccessible, since the japanese keyboad lack a key at the expected position. On the other hand laptop have PageUp/Down only accessible via function keys.

Zooming in/out is used very often. List scrolling with cursors does not work (only when the list would have focus, which it never gains) thus working page up/down will be unexpected, imho.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: PageUp / PageDown - Keys
« Reply #3 on: January 28, 2009, 10:28:26 AM »
I see you points.

What about the navigation in z-direction?

Thinking again about my proposal made me change my mind: Instead of cycling through all tiles (bridges, elevated etc) above one ground, it would be much more practical to select the right thing by mouse only. That would imply a rewrite of the transformation code 'mouse position -> 3d-coordinates', in simworld.cc, karte_t::bewege_zeiger, lines 4035--4100.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: PageUp / PageDown - Keys
« Reply #4 on: January 28, 2009, 10:42:35 AM »
Go ahead. For this purpose I changed all tools to accept 3D coordinates.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: PageUp / PageDown - Keys
« Reply #5 on: January 28, 2009, 11:12:26 AM »
.. if time and other patches permits ..