GUIDrop Drag and Drop Images onto Mudlet

Share your scripts and packages with other Mudlet users.
Post Reply
Alyven
Posts: 20
Joined: Sat Oct 01, 2011 8:43 pm

GUIDrop Drag and Drop Images onto Mudlet

Post by Alyven »

GUIDrop adds functionality to add images directly to Mudlet by Drag&Drop
The script and luacode will be created automatically.
It uses Adjustable Container with some extras. (check the custom menu)

Once found the position you want the image at, it can be converted into a normal Geyser.Label and use all the perks of them.
(The code is also auto-generated)

This is a very early version,
if you find issues or have some ideas how to improve GUIDrop
please leave feedback in the issue tab or in this thread.

Github link: https://github.com/Edru2/GUIDrop
Github release link: https://github.com/Edru2/GUIDrop/releases
Short showcase video: https://youtu.be/Zl7h83SA9bY

Have fun :)

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: GUIDrop Drag and Drop Images onto Mudlet

Post by Caled »

Some initial thoughts:

Deleting a label created in this way doesn't seem to be easy. I found I needed to delete the file in the profile/AdjustableContainers folder.

Having run the convert to label function via the right click menu, there isn't an easy way to get it back into the GUIDropManager. At first I thought I worked out a way but I was wrong as there is a lot more to what you're doing than I initially understood.
- I'm not sure what the easiest workflow there would be. Obviously you can't have clicking enabled on the label after you've converted it, because people will presumably want to use the clickCallBack for their own purposes (I certainly do).

I'll keep playing around with it and if I think of any more feedback I'll let you know. The script itself seems wonderful though, and I'm now dreaming of simple ways to extend the behaviour of labels created by other scripts.

Alyven
Posts: 20
Joined: Sat Oct 01, 2011 8:43 pm

Re: GUIDrop Drag and Drop Images onto Mudlet

Post by Alyven »

Caled wrote:
Thu May 07, 2020 4:09 am
Deleting a label created in this way doesn't seem to be easy. I found I needed to delete the file in the profile/AdjustableContainers folder.
Have you tried delete image in the right click menu? (I have to remove some options there so it's more visible)
That one is doing exactly that (deleting the file in profile/AdjustableContainers) :)
Caled wrote:
Thu May 07, 2020 4:09 am
Having run the convert to label function via the right click menu, there isn't an easy way to get it back into the GUIDropManager. At first I thought I worked out a way but I was wrong as there is a lot more to what you're doing than I initially understood.
- I'm not sure what the easiest workflow there would be. Obviously you can't have clicking enabled on the label after you've converted it, because people will presumably want to use the clickCallBack for their own purposes (I certainly do).
Yes, I was thinking about a way to convert back as well. (Have some ideas but still didn't write any code for it)
A workaround would be, not to convert to label but to use disableClickthrough on the Label.
And if you wan't to move/resize it again use enableClickthrough again.

I just noticed that disable/enable Clickthrough is not being saved anywhere in the Geyser.Label I'll PR that.

So if you want disableClickthrough to be persistent you'll have to change it also in script lua code from clickthrough=true to clickthrough = false.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: GUIDrop Drag and Drop Images onto Mudlet

Post by Caled »

Cool, I'll try leaving it as a label in an adjustable container and see how that goes.

In terms of deleting it, I mean, after it has been converted to a label, it is still defined both in the script editor and in a lua file. Deleting it from the script editor and restarting mudlet, causes it to be pulled from the lua file.

But because it has been converted to a label, there is no right click menu any more.

Alyven
Posts: 20
Joined: Sat Oct 01, 2011 8:43 pm

Re: GUIDrop Drag and Drop Images onto Mudlet

Post by Alyven »

Caled wrote:
Fri May 08, 2020 12:18 am
In terms of deleting it, I mean, after it has been converted to a label, it is still defined both in the script editor and in a lua file. Deleting it from the script editor and restarting mudlet, causes it to be pulled from the lua file.

But because it has been converted to a label, there is no right click menu any more.
Yes, that is an issue I didn't notice before (it was working before then there were some changes on Adjustable.Container)

Thanks for testing and letting me notice it :)

This PR should solve this issue.
https://github.com/Edru2/GUIDrop/pull/2

Post Reply