Patch: Store and restore map locations

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Patch: Store and restore map locations

Post by Terkhen »

This patch is just a complete rewrite of PhilSophus Location Registers: Save/restore locations on the map, due to the huge changes in trunk since then. It allows to store up to 4 map locations pushing CTRL + PG_UP, CTRL + PG_DOWN, CTRL + HOME or CTRL + END. To make the screen scroll back to the desired location, just press PG_UP, PG_DOWN, HOME or END.

The key scheme and number of stored locations can be changed very easily, and I'm interested in suggestions to improve them.
Attachments
location-storing-15864.diff
(5.85 KiB) Downloaded 222 times
location-storing-win32-15864.rar
(2.86 MiB) Downloaded 134 times
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: Patch: Store and restore map locations

Post by XeryusTC »

What's wrong with using signs for this? You can have way more than 4 signs in a single game ;)
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Store and restore map locations

Post by Terkhen »

Yes, but you can't access them with a single key. Signs are perfect to remember important locations, but you have to open the sign list window an search for the one you want. Storing them with this patch is useful to switch quickly between the locations you are using at the moment.
Iguanna
Engineer
Engineer
Posts: 100
Joined: 21 Nov 2007 00:06

Re: Patch: Store and restore map locations

Post by Iguanna »

About the keys, normally on windows (same on other OSs?) those keys are used to scroll lists. PgUp and PgDown would scroll 1 page, and Home, End would scroll the the beginning or end. Maybe they are not ideal keys to use, but I can't think of any better ones. They don't seem to scroll the lists anyway, or didn't for the train list when I tried just now, so maybe it would be fine to use them.

Edit: BTW this would be an handy feature IMO, since there are usually a couple of spots I go to a lot.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Store and restore map locations

Post by Terkhen »

I thought about using the function keys (as PhilSophus did), but since they are already in use, restoring a location would need two keys instead of one (for example CTRL + F1). PhilSophus also used the numpad keys, but since I use a laptop I would still need two keys for restoring and three for storing. The easiest group of keys that would allow to restore a location with a single keystroke were these four (they're only used at the consoles). Anyways, the patch is very simple: I could just implement different key sets and allow to switch between them with a patch option.
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Patch: Store and restore map locations

Post by DJ Nekkid »

pg-up/down are used for zoom in/out isnt them?
Member of the
ImageImage
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Store and restore map locations

Post by Terkhen »

No: the scroll keys aren't used at all in OpenTTD, except at the console.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Patch: Store and restore map locations

Post by Eddi »

i vaguely remember them being used for diagonal movement (map scrolling, mouse pointer with ALT) in TTO, but i might mix that up with other games...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests