Prevent Player from double clicking token to open token edit

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Varkin
Kobold
Posts: 7
Joined: Mon May 04, 2015 1:59 am

Prevent Player from double clicking token to open token edit

Post 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.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Prevent Player from double clicking token to open token

Post 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.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Prevent Player from double clicking token to open token

Post by JamzTheMan »

https://www.youtube.com/watch?v=by8AZX9dyiw

Man...brings back memories...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Prevent Player from double clicking token to open token

Post 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.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Prevent Player from double clicking token to open token

Post 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...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
metatheurgist
Dragon
Posts: 363
Joined: Mon Oct 26, 2009 5:51 am

Re: Prevent Player from double clicking token to open token

Post 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. :)

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Prevent Player from double clicking token to open token

Post 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.

Varkin
Kobold
Posts: 7
Joined: Mon May 04, 2015 1:59 am

Re: Prevent Player from double clicking token to open token

Post 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.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Prevent Player from double clicking token to open token

Post 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...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

JayDex
Kobold
Posts: 1
Joined: Fri Jul 21, 2017 7:27 am

Re: Prevent Player from double clicking token to open token

Post 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)

Post Reply

Return to “MapTool”