Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jun 19, 2013 6:56 am

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Aug 23, 2009 3:51 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
This one is the penultimate of my patching spree. Don't worry about my sanity; it is very small and simple, but pretty handful. This feature allows to close any tool currently in use pressing the middle mouse button. This is specially useful with persistent tools and / or quick goto turned on. I know that you can already do the same with the ESC key, but it is so far from the rest of frequently used keys that I lose too much time using it. Try it once and you will never go back, I know I won't :D

The middle mouse button code (the complicated part) was created by erikjanp for the shade windows patch, which means that almost every line of this code was made by him.

Right now the behaviour is to close tools if there's a tool active, which lefts open the possibility of allowing it to do other things under different conditions. Do you think this behaviour for the middle button is consistent enough?. Is there any problem with using the middle button (besides that this feature can't be used in platforms without this button)?.


Attachments:
close_tools_middle_v1_r17268.diff [4.55 KiB]
Downloaded 68 times
close_tools_middle_win32_v1_r17268.rar [2.71 MiB]
Downloaded 58 times
close_tools_middle_shade_windows_v2_r17435.diff [467 Bytes]
Downloaded 44 times

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Last edited by Terkhen on Sun Sep 06, 2009 10:35 pm, edited 2 times in total.
Top
 Profile  
 
 Post subject: Patch: Persistent clone
PostPosted: Sun Aug 23, 2009 4:58 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
And the last one: persistent clone. While you are cloning, the clone tool stays active until you click on its button again or press ESC. To turn on / off this behaviour, it uses the same setting than the persistent building tool.


Attachments:
persistent_clone_v2_r17273.diff [509 Bytes]
Downloaded 60 times
persistent_clone_win32_v2_r17273.rar [2.71 MiB]
Downloaded 47 times

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Last edited by Terkhen on Mon Aug 24, 2009 12:24 pm, edited 1 time in total.
Top
 Profile  
 
PostPosted: Sun Aug 23, 2009 6:23 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
I find close tools with middle mouse button very useful. I usually have to use del key, therefore my finger is on the del key almost all the time that I am building. The tool that is sort-of pesky is the Land Area Information, since that doesn't go away when you press del. I don't know what people will do without a middle mouse button though. :roll:

:arrow: As for the persistant clone tool, as of now, that one didn't work for me. I tried making an aircraft, then clicked on clone and when I cloned it, I had to re-click clone vehicle again. I've a feeling I'm using this one wrong. :?:

If you need me to post screenshots, video, I can do that.

Keep up the good work Terkhan and erikjanp :!:

Me gusta como trabajas.

Peter


Top
 Profile  
 
PostPosted: Sun Aug 23, 2009 8:32 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
petert wrote:
:arrow: As for the persistant clone tool, as of now, that one didn't work for me. I tried making an aircraft, then clicked on clone and when I cloned it, I had to re-click clone vehicle again. I've a feeling I'm using this one wrong. :?:


You probably have the setting for quick goto off; As stated, right now they are using the same setting. Turn it on and you will be able to enjoy persistent cloning.

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Sun Aug 23, 2009 8:58 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
Like I said:

petert wrote:
I've a feeling I'm using this one wrong.


Thanks for the help.


Top
 Profile  
 
PostPosted: Mon Aug 24, 2009 12:26 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
I just tested that these patches can apply to the 0.7 branch without rejects.

Edit: Persistent clone updated. I just made it use the existing "persistent building tools" settings: it is more correct in this way.

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Mon Aug 24, 2009 9:25 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
Can you update the first post with the compiled binary of v2 of persistant clone?


Top
 Profile  
 
PostPosted: Mon Aug 24, 2009 9:43 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
The persistent clone binary and diff are at the second post. Why should I move the files?

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Tue Aug 25, 2009 2:02 am 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
Edit: Removed ptMPP from here, check out

ptMPP's Google Code Page


Last edited by petert on Sun Nov 08, 2009 12:08 am, edited 6 times in total.

Top
 Profile  
 
PostPosted: Tue Aug 25, 2009 7:38 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
If you are going to create a patch pack, you should start a new thread for it.

Edit: The download link is not correct: after clicking on the url I had to remove "Connection: close" from the end of the url to download it. Also, the zip file still has the .svn folders. If you export the files with svn after compiling and before packing (or delete the .svn folders manually) the zip file will be lighter.

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Tue Aug 25, 2009 3:43 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
The url doesn't contain "Connection: Close" at the end. I don't know what caused that.


Top
 Profile  
 
PostPosted: Tue Aug 25, 2009 3:46 pm 
Offline
Engineer
Engineer

Joined: Tue Aug 01, 2006 7:30 am
Posts: 93
MediaFire doesn't allow you to link directly to the file, you need to link here: http://www.mediafire.com/?o2dv1d5xey3

_________________
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.


Top
 Profile  
 
PostPosted: Tue Aug 25, 2009 4:15 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3007
Location: Massachusetts, USA
Ok, I updated the link. Thank you Scatura.


Top
 Profile  
 
PostPosted: Wed Aug 26, 2009 2:52 pm 
Offline
President
President
User avatar

Joined: Sun Jun 18, 2006 6:18 pm
Posts: 951
Location: Switzerland
Terkhen wrote:
If you export the files with svn after compiling and before packing (or delete the .svn folders manually) the zip file will be lighter.


or just use "make bundle_*" ;-)

_________________
Image
Town Names: Image Portuguese Image Belarusian Image French Image Swiss · Image Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!


Top
 Profile  
 
PostPosted: Wed Aug 26, 2009 3:20 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
Ammler wrote:
or just use "make bundle_*" ;-)


Sadly that's not possible for me since I use Visual Studio (or at least I wasn't able to find documentation about it).

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Wed Aug 26, 2009 3:33 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Terkhen wrote:
Ammler wrote:
or just use "make bundle_*" ;-)


Sadly that's not possible for me since I use Visual Studio (or at least I wasn't able to find documentation about it).

I use Visual Studio too, but for making a bundle I use cygwin or msys.


Top
 Profile  
 
PostPosted: Wed Aug 26, 2009 3:44 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
I use gnuwin32 tools myself: I had to uninstall msys because it conflicted with devkitpro. Now that I finished my project involving devkitpro, I can give msys another chance when I finish my exams.

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Wed Aug 26, 2009 4:52 pm 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
Terkhen wrote:
Right now the behaviour is to close tools if there's a tool active, which lefts open the possibility of allowing it to do other things under different conditions. Do you think this behaviour for the middle button is consistent enough?. Is there any problem with using the middle button (besides that this feature can't be used in platforms without this button)?.

If there's a tool active and you middle-click on the title-bar of a window, what happens? Does the window (un)shade, or does the tool get closed? (Or -- horror of horrors -- both?)

_________________
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser


Top
 Profile  
 
PostPosted: Thu Aug 27, 2009 6:49 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1029
Location: Spain
The planned behaviour is to close the the tool first, and another click would shade the window. When the shade windows patch gets updated to trunk, I will do a version of close tool with middle click compatible with it. Right now, if you just tried to solve the rejects between the two patches manually shading window with middle click could either not work at all or land in the horror of horrors, depending on how it was solved. These are the correct changes, if anyone wants to try it before shade windows is updated.

Without erikjamp's code for middle click, my patch is this single line (placed in the part of the code that handles middle clicking):

Code:
if (_cursor.sprite != SPR_CURSOR_MOUSE) ResetObjectToPlace();


To have compatibility with shade windows, it needs to be like this:

Code:
if (_cursor.sprite != SPR_CURSOR_MOUSE) {
   ResetObjectToPlace();
} else {
   click = MC_MIDDLE; //Constant that I currently don't use, as the middle click don't needs to be checked in the GUI in my patch.
}

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Thu Aug 27, 2009 7:59 pm 
Offline
Tycoon
Tycoon

Joined: Sun Dec 09, 2007 9:28 pm
Posts: 1648
How about clicking the middle mouse button again re-instates the previous tool?

_________________
The British Rail OpenTTD set: thread | forum
The BROS - we're getting there.
My screenshot thread


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google Feedfetcher and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.