Is it possible to drag and drop the image like this?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Is it possible to drag and drop the image like this?

#1 Post by Nanahs »

Ok, I may be asking too much hah
But I think this could be something interesting.

My game simulates a cellphone. Let's just say it's something like this image:

Image

The code is very simple. I'm using hotspots, so that when the person clicks on "pictures", for example, they go to a gallery (jump to the gallery label).

I was thinking that it could be more interesting/realistic if the person could drag the icons (songs, pictures, messages) to organize the screen the way they want. Just like we can do in our real phones.

I've read thought this drag and drop tutorial: viewtopic.php?t=12504
It's really good and I was able to understand and test it myself.

But I don't know if it's possible to use this for what I wanted to do for the phone thing.

Those are the points:
* The images/icons are not simply "decorations". They would, when clicked, take you (jump) to a label.
* I don't want it to be "limited", like in a puzzle where they have a specific place they have to stay. I want them to be able to stay anywhere in the screen, where the person drags/places it.
* I'd probably have to turn the image/icon into an imagebutton I guess? And use a screen to do it?

Could you just give me an idea, if I should use imagebutton or what would be better on this case?
And if it's something possible or not?
I'm not sure if you can make an image draggable, and at the same time estabilish a function to it.
I tried a few things here and the errors wouldn't stop :?:

Thank you.

Post Reply

Who is online

Users browsing this forum: Google [Bot]