Page 1 of 1

Prevent Player from double clicking token to open token edit

Posted: Sat Apr 30, 2016 7:06 am
by Varkin
Is there a way to shut off the double clicking on a token to open the token edit? It is causing issues with my setup and I would like to shut off that feature. I only want the token edit box to come up when you right click and go to edit.

Re: Prevent Player from double clicking token to open token

Posted: Sat Apr 30, 2016 7:24 am
by aliasmask
Nope. If you're having trouble with double clicking you can adjust the speed with your mouse set up in the windows control panel.

Re: Prevent Player from double clicking token to open token

Posted: Sat Apr 30, 2016 4:44 pm
by JamzTheMan
https://www.youtube.com/watch?v=by8AZX9dyiw

Man...brings back memories...

Re: Prevent Player from double clicking token to open token

Posted: Sat Apr 30, 2016 6:38 pm
by Full Bleed
Varkin wrote:Is there a way to shut off the double clicking on a token to open the token edit? It is causing issues with my setup and I would like to shut off that feature. I only want the token edit box to come up when you right click and go to edit.
Heh, sounds like an overzealous player. ;) Alias is right though, if a player is accidentally popping open the token they should look at increasing the speed of their double-click to register as a double-click. This probably isn't the only app they have a problem with (as the double click speed is an OS setting).

I actually should use this shortcut more. I always forget I can get into a token this way... and tend to use the right-click context menu.

All of that said, I can't imagine that this would be a really difficult setting to create in MT. But it does seem like few devs like to add settings like this.

Re: Prevent Player from double clicking token to open token

Posted: Sun May 01, 2016 2:26 pm
by JamzTheMan
Find the class to inject this code: A few minutes
Add a boolean condition to disable: Seconds
Adjust the Preferences panel form to create new preference setting to store boolean and save preference: frustratingly to long

Learning to click slower: Priceless


*Please take this jokingly. It's a reasonable request, it's just the time & effort to add this bit of customization is better spent on other items...

Re: Prevent Player from double clicking token to open token

Posted: Sun May 01, 2016 9:35 pm
by metatheurgist
Yes, it's funny in the GUI age often the most annoying thing to do is the User Interface. Makes one long for the good old days of ini files. :)

Re: Prevent Player from double clicking token to open token

Posted: Mon May 02, 2016 2:16 am
by wolph42
metatheurgist wrote:Yes, it's funny in the GUI age often the most annoying thing to do is the User Interface. Makes one long for the good old days of ini files. :)
Yup.

Re: Prevent Player from double clicking token to open token

Posted: Mon May 02, 2016 10:46 pm
by Varkin
Full Bleed wrote:
Varkin wrote:Is there a way to shut off the double clicking on a token to open the token edit? It is causing issues with my setup and I would like to shut off that feature. I only want the token edit box to come up when you right click and go to edit.
Heh, sounds like an overzealous player. ;) Alias is right though, if a player is accidentally popping open the token they should look at increasing the speed of their double-click to register as a double-click. This probably isn't the only app they have a problem with (as the double click speed is an OS setting).

I actually should use this shortcut more. I always forget I can get into a token this way... and tend to use the right-click context menu.

All of that said, I can't imagine that this would be a really difficult setting to create in MT. But it does seem like few devs like to add settings like this.
The problem is the touch screens on the edge of the table are small and sometimes when using a stylus on them the stylus double touches the screen and causes the edit icon window to open. The big problem with this is the edit window does not open on the touch screen that did the double touching, it opens on the GMs screen. Ok, to totally understand this I need to give some backround. I built a video table. it has a GM screen, a screen in the center of the face of the table, and touch screen at each players table edge. Each screen in a different display from the same computer. So there is no lag time using this setup. the problem is when a players accidentally double taps on their token (which is very easy to do) it opens the edit token window on the GMs screen. So the GM (Me) has to close the window and the player doesn't see it open so they have no idea why all of a sudden they can't move their token. I will try increasing the double click speed and see if that lowers the occurrence of the problem. To see the table look at the link in my sig.

Thank you for the ideas everyone.

Re: Prevent Player from double clicking token to open token

Posted: Thu May 05, 2016 6:40 pm
by JamzTheMan
More information is always good! I've been meaning to look into more "touch" friendly code. (I own a MS Surface Pro 3 so...)

One thought was adding a button at the top like Adobe Reader does to turn touch on/off. This would invert the click/right click so dragging tokens would be easier and you would long press for multi-selection.

It's on the radar but a little further down the road for...reasons...

Re: Prevent Player from double clicking token to open token

Posted: Fri Jul 21, 2017 7:48 am
by JayDex
An old post I know, but here is a solution for those who come across this
(Solution Valid for MapTool 1.4.0.5): Cannot say for certain that code won't move around

For those who don't want to do all the steps: https://drive.google.com/open?id=0B_jl1 ... 2Z0eHNtX1k
- The drive above contains the modified maptool, fully compiled for Window

Step 1.
- You'll want to download Maptools from their Github page https://github.com/RPTools/maptool
- Clone/Download the Zip to your desktop

Step 2.
- Unzip the zip folder, and open the folder maptool. You'll see many folders inside it. Navigate to the following file
- ./maptool/maptool/src/main/java/net/rptools/maptool/client/tool/PointerTool.java
- PointerTool.java handles the click events

Step 3.
- Open the file "PointerTool.java" in any IDE you want, like Atom, Sublime, even notepad works

Step 4.
- Look for the line (Using Control-F would be easier):
- "if (e.getClickCount() == 2 && SwingUtilities.isLeftMouseButton(e)) {"
- I found this on line 431 for the version I modified

Step 5.
- You see the number "2", change that to -1 if you want to disable it completely. So that line will look like:
- if (e.getClickCount() == -1 && SwingUtilities.isLeftMouseButton(e)) {
- Basically, that number dictates how many time you need to click it before that token menu opens (Within a X amount of time)

Step 6.
- Save the changes, and now you want to build the project (Look at the README.md at the root directory for instructions)