Patches: Close tool with middle click / persistent clone
Moderator: OpenTTD Developers
Re: Patches: Close tool with middle click / persistent clone
audigex: But that would mean devoting the middle button only to reopening and closing tools... In which situations would reopening last tool be useful?
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patches: Close tool with middle click / persistent clone
I had a situation in mind, but I can't for the life of me remember now :s it was something to do with wanting to quickly select a station or train before continuing building.
I find that I occasionally want to click menu items (eg increase loan amount, starting trains moving) from already open windows. It would just be an ergonomic improvement to me (less movement) to wheel-click, click the button and wheel click again, rather than moving up to the toolbar, click, to the button, click, back to the toolbar, click and back to where I was building.
Alternatively, how about wheel-clicking cycles through a few handy tools?
Eg if I click the mouse wheel on no tool, for the first x (3?) seconds it cycles through the autorail, signal, station and depot tools. As soon as I place one or more rail/signal etc or 3 seconds pass, it reverts to cancelling the current tool.
It could even bring up tools based to the last used tool, eg if I just closed a rail tool, it cycles through rail tools - same for landscaping, ships, RVs and aeroplanes. If dont properly it could improve the whole ergonomic situation massively - an area where TTD (as with most games of the era, and most strategy/simulation games) have in common - by reducing the amount of movement while saving time.
I find that I occasionally want to click menu items (eg increase loan amount, starting trains moving) from already open windows. It would just be an ergonomic improvement to me (less movement) to wheel-click, click the button and wheel click again, rather than moving up to the toolbar, click, to the button, click, back to the toolbar, click and back to where I was building.
Alternatively, how about wheel-clicking cycles through a few handy tools?
Eg if I click the mouse wheel on no tool, for the first x (3?) seconds it cycles through the autorail, signal, station and depot tools. As soon as I place one or more rail/signal etc or 3 seconds pass, it reverts to cancelling the current tool.
It could even bring up tools based to the last used tool, eg if I just closed a rail tool, it cycles through rail tools - same for landscaping, ships, RVs and aeroplanes. If dont properly it could improve the whole ergonomic situation massively - an area where TTD (as with most games of the era, and most strategy/simulation games) have in common - by reducing the amount of movement while saving time.
Jon
Re: Patches: Close tool with middle click / persistent clone
Interesting. I thought the other order would be a better choice.Terkhen wrote:The planned behaviour is to close the the tool first, and another click would shade the window.
My reasoning is that a middle click on a title bar with an active tool means one of two things:
- You want to shade a window. Likely, a window that is obstructing your use of the active tool, and possibly even the window that opened the tool. (e.g. the build-station or build-industry windows)
- You want to close the active tool, and happen to be pointing at a title bar.
When you accidentally middle-clicked before you were ready to?Terkhen wrote:audigex: But that would mean devoting the middle button only to reopening and closing tools... In which situations would reopening last tool be useful?

Or you could just click the button while the tool is active.audigex wrote:I find that I occasionally want to click menu items (eg increase loan amount, starting trains moving) from already open windows. It would just be an ergonomic improvement to me (less movement) to wheel-click, click the button and wheel click again, rather than moving up to the toolbar, click, to the button, click, back to the toolbar, click and back to where I was building.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Patches: Close tool with middle click / persistent clone
I keep the tool open in these cases, as DaleStan said.audigex wrote:I find that I occasionally want to click menu items (eg increase loan amount, starting trains moving) from already open windows. It would just be an ergonomic improvement to me (less movement) to wheel-click, click the button and wheel click again, rather than moving up to the toolbar, click, to the button, click, back to the toolbar, click and back to where I was building.
There are two problems with that. The most important is that scrolling is already being used for zooming / scrolling the map. The second is... which ones are handy tools exactly?. I doubt that there's a selection that makes everybody happy. It would need some way of personalization, using a key configuration feature that does not exist in trunk (the configurable hotkeys patch is developing it).audigex wrote:Alternatively, how about wheel-clicking cycles through a few handy tools?
Your reasoning is right: I would probably end up closing the tool while trying to shade the window too. When I get to it, I'll give closing the active tool a lower priority than shading windows.DaleStan wrote:My reasoning is that a middle click on a title bar with an active tool means one of two things:I figure that the first is more likely than the second.
- You want to shade a window. Likely, a window that is obstructing your use of the active tool, and possibly even the window that opened the tool. (e.g. the build-station or build-industry windows)
- You want to close the active tool, and happen to be pointing at a title bar.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patches: Close tool with middle click / persistent clone
As promised, I have attached in the first post a version of the close tool with middle click patch that is compatible with the shade windows patch. If you middle click anywhere in the main window (that means not in the toolbar or in any other window), the current tool will be closed. I thought it would be more complicated to implement the behaviour that DaleStan suggested, but it was easy thanks to erikjamp's great design for the middle mouse button code. You can use this version of the patch only after applying the three parts of the Shade windows patch.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patches: Close tool with middle click / persistent clone
Heh, I didn't really design it, I didn't do much more than copy the right mouse button code and then s/right/middle/.thanks to erikjamp's great design for the middle mouse button code

So thanks to the original author of the code, for making it easy extendible.
Who is online
Users browsing this forum: No registered users and 15 guests