[1.3b50] Show dialog when CTRL-dragging in from Library
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
[1.3b50] Show dialog when CTRL-dragging in from Library
So we have the option to show or not show the dialog in the preferences. I find that most of the time I don't want the dialog, but it would be cool if we could wire up a ctrl and drag to show the dialog, regardless of the setting.
Then, when I want the dialog, I just ctrl drag.
Then, when I want the dialog, I just ctrl drag.
Last edited by Tyren on Mon Feb 16, 2009 10:59 am, edited 1 time in total.
Re: [1.3b50] Show dialog when right-dragging in from Library
Wow, no one commented on this yet. That means that either no one understands what I'm asking for, or it's such and awesome idea that everyone loves it?!
Did what I am asking for make sense?
Did what I am asking for make sense?
- jfrazierjr
- Deity
- Posts: 5176
- Joined: Tue Sep 11, 2007 7:31 pm
Re: [1.3b50] Show dialog when right-dragging in from Library
Yep... it's probably a good idea...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Re: [1.3b50] Show dialog when right-dragging in from Library
Yep. I had nothing to contribute, however.
Re: [1.3b50] Show dialog when right-dragging in from Library
We would have to put in special handling for the Mac users that are confused by multi-button mice.
Re: [1.3b50] Show dialog when right-dragging in from Library
Poppycock! Every one of my mice are mult-button! 'Cept the one built into the macbook. >.> That rarely, if ever, gets used.Phergus wrote:We would have to put in special handling for the Mac users that are confused by multi-button mice.
Re: [1.3b50] Show dialog when right-dragging in from Library
Actually, I'll have to try out my touchpad with the JAR that recognizes the Mac's Command key for menus.
It's always been a problem that I couldn't drag the map because I had to use Control-Button1 but the MapTool seemed to get lost with the Control key or something because afterwards the touchpad never worked correctly. So I always you to just use "T" to jump from token to token (which centers the map) without using the right-click drag...
It's always been a problem that I couldn't drag the map because I had to use Control-Button1 but the MapTool seemed to get lost with the Control key or something because afterwards the touchpad never worked correctly. So I always you to just use "T" to jump from token to token (which centers the map) without using the right-click drag...
Re: [1.3b50] Show dialog when right-dragging in from Library
So, it seems that Java's Drag/Drop library is weird, and determining if the right mouse button was used isn't easy.
I did an easy fix to make it I use CTRL. So if I hold down CTRL and drag an item to the map, it will show the dialog.
So, err, if I did want to send a patch... how do I do that? Heh.
I did an easy fix to make it I use CTRL. So if I hold down CTRL and drag an item to the map, it will show the dialog.
So, err, if I did want to send a patch... how do I do that? Heh.
Re: [1.3b50] Show dialog when right-dragging in from Library
Do you mean testing ACTION_COPY or ACTION_MOVE as the user drop action? Because just testing that control is down during a drag event is not portable and I think only works under windows.Tyren wrote:So, it seems that Java's Drag/Drop library is weird, and determining if the right mouse button was used isn't easy.
I did an easy fix to make it I use CTRL. So if I hold down CTRL and drag an item to the map, it will show the dialog.
So, err, if I did want to send a patch... how do I do that? Heh.
Re: [1.3b50] Show dialog when right-dragging in from Library
If theoretically you wanted to create a patch and had Subclipse installed in Eclipse:Tyren wrote:So, err, if I did want to send a patch... how do I do that? Heh.
* You would right-click on the MapTool project
* Select Team -> Create Patch
* Choose where/how you want it saved
* Choose recurse into subfolders
* Email patch file to Trevor - see his profile for the forum for address
Re: [1.3b50] Show dialog when CTRL-dragging in from Library
Sweet. I had everything except the "send to Trevor" part.
It's a really small change, and I love being able to just show the dialog when I need it. I hope this one makes it into the build.
It's a really small change, and I love being able to just show the dialog when I need it. I hope this one makes it into the build.
Re: [1.3b50] Show dialog when CTRL-dragging in from Library
Did you see Craig's note? Checking for Control is NOT the right way to handle this. It should be handled by the TransferHandler returning TransferHandler.COPY_OR_MOVE from the getSupportedActions().Tyren wrote:Sweet. I had everything except the "send to Trevor" part.
It's a really small change, and I love being able to just show the dialog when I need it. I hope this one makes it into the build.
(Which actually reminds me of how MT does a lot of it's mouse handling, making me think that my Ctrl-Button1 on the Mac touchpad won't be fixed by my Command key patch.)
However, I seem to recall that MT doesn't use the Swing DND stuff...
Re: [1.3b50] Show dialog when CTRL-dragging in from Library
Ah, I see. COPY = LEFT click, MOVE = RIGHT click? I'll try this.
Re: [1.3b50] Show dialog when CTRL-dragging in from Library
So, it looks like the drop is always coming in as "COPY". I assume that when we "start" the drag/drop action we can set the action. But I can't seem to find where we do this. Any help?
Re: [1.3b50] Show dialog when CTRL-dragging in from Library
I haven't checked out b51 yet, but it looks like line 102 in ImagePanel.java references ACTION_COPY. That parameter should be the list of valid actions, so change it to ACTION_COPY_OR_MOVE.
With just a quick look, that might be all that's needed.
With just a quick look, that might be all that's needed.