Page 1 of 1

Is it possible to add an imagebutton here?

Posted: Thu Dec 06, 2018 10:01 am
by Nanahs
So, I'm still stuck on the drag and drop thing :?: hah

I made this code and it's working:

Code: Select all

screen drag:
    zorder 50

    draggroup:
        drag:
            drag_name "pink"
            draggable True
            add "drop.png"

label start:

    scene b
    
    call screen drag
The only thing I want is to add was a function. I wanted to attach an imagebutton together/inside of the "drop" image.
So wherever I dragged the "drop" to, the imagebutton would go together. So the person can place it where they want.

Base on many tutorials I found, I tried something like this:

Code: Select all

screen drag:  
    viewport:
        scrollbars "horizontal"
        child_size (720, 1280)
            
        side_xpos 0
        side_ypos 0
                
        draggable True
        mousewheel True

        add "drop.png"
            
        imagebutton auto "pink.png" xpos 50 ypos 30 action Jump("park") 
But it's giving me errors, saying "not all arguments converted during string formatting".

Does anyone have any idea about it?

This is the project if you want to check: https://drive.google.com/open?id=1ZKZyd ... SETcKhxj2-

ps: the blue square ("drop.png") would be the draggable image. And the pink square would be the imagebutton inside it, that would be dragged together.

Image

Thanks.