Hi,
I don't know if its doable because its seems really complicated to me and I have no idea where I should start.
But I want to drag an image button (or a simple image if its necessary) from my inventory screen (which is linked to a Python inventory system).
I want to be able to drag it everywhere on the screen and put it in a container (a square) which is somewhere on the screen (with coordinates).
But, if its not inside this square when the player release it, the image button should come back directly to his original spot.
If its in the square, the image button (inventory icon) will stick inside the square and disappearform the inventory menu.
I only know how to do the second part (make it disappear from the inventory screen thanks to the item.drop fonction).
But I don't know how to make the first part (with the square coordinate condition).
If you have any idea let me know it will be great
Python class and Drag fonction
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.
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.
-
- Veteran
- Posts: 312
- Joined: Fri Nov 17, 2017 6:40 pm
- Completed: Apocalypse Lovers
- Projects: Apocalypse Lovers
- Organization: Awake_Production
- Location: France
- Discord: https://discord.gg/apocalypse-lovers
- Contact:
-
- Veteran
- Posts: 312
- Joined: Fri Nov 17, 2017 6:40 pm
- Completed: Apocalypse Lovers
- Projects: Apocalypse Lovers
- Organization: Awake_Production
- Location: France
- Discord: https://discord.gg/apocalypse-lovers
- Contact:
Re: Python class and Drag fonction
Nevermind I find and other way to do what i was trying to do.
I've use an other sub class on the model of my inventory class and I called it container.
And I just had to play with item_use and append / remove fonction to do it.
I give up to use the drag fonction in all that mess, it was to luxuous for me anyway
I've use an other sub class on the model of my inventory class and I called it container.
And I just had to play with item_use and append / remove fonction to do it.
I give up to use the drag fonction in all that mess, it was to luxuous for me anyway
Who is online
Users browsing this forum: Google [Bot], Ocelot