PDA

View Full Version : Tracking click+drag mouse position?



celestian
July 29th, 2019, 20:23
I want to be able to have a user click on a button/icon and "drag" the "thing" and track that position as they move it and know the instant it's released and get that position.

Why? I'd like to try and come up with a way people can resize subwindows in a bigger window. Right now I don't think there is a way to do this without coming up with my own manual/programmatically method.

The simplest way would be to add clickable buttons that let you change the width by X increments but thats pretty crude. I'd rather have a more modern style where you just drag it.

Or am I just missing a easier way to do this?

Bidmaron
July 29th, 2019, 23:27
I already did this Celestian. I created a DragLine control that vertically resizes the controls above and below it. When I get home tonight I will link to where I did that.
This link (https://www.fantasygrounds.com/forums/showthread.php?41325-Dragline-Control) is where I placed the material and the thread discusses aspects of it.

Bidmaron
July 30th, 2019, 02:24
Edited my previous post to add the link. Maybe you can sweet talk MW into putting it into CoreRPG.

celestian
July 30th, 2019, 03:55
Edited my previous post to add the link. Maybe you can sweet talk MW into putting it into CoreRPG.

Thanks! I'll check it out. Sounds interesting.

celestian
August 1st, 2019, 05:14
I already did this Celestian. I created a DragLine control that vertically resizes the controls above and below it. When I get home tonight I will link to where I did that.
This link (https://www.fantasygrounds.com/forums/showthread.php?41325-Dragline-Control) is where I placed the material and the thread discusses aspects of it.

I had the chance to look at this and it uses drag/drop to track which is what I was afraid of. Do you know of any ruleset or extension that uses it so I can see it in action?

Bidmaron
August 1st, 2019, 11:21
My generators extension uses it and minty fresh used it in his filters extension I think.

How else would you do it? That is what you asked for in the OP