Page 1 of 1

How to show and move image (Displayable) in the middle of screen interaction?

Posted: Fri Jun 22, 2018 10:12 am
by derkonstantin
I have a simple script example which create screen, add some buttons with some "stuff" doing by pushing this button.

Code: Select all

init -1 python:

    def some_function():
        # some strange logic

        # ------------------------
        # show image on x1, y1
        # move image to x2, y2
        # hide image
        # ------------------------

        # some other starange logic
        pass

screen tr_tr:
    modal True
    imagebutton idle '1.png' xpos 100 ypos 100 action Function(some_function)
    imagebutton idle '2.png' xpos 500 ypos 100 action Function(some_function)
    if 1>2:
        textbutton "End Game" xalign 0.5 yalign 0.5 action Return()

label l1:
    call screen tr_tr
    jump l1
I want on click buttons call python function with some logic, in the middle of it I want to show some image (Dynamic displayable)(possible with some effects), move it to other coordinate and hide it. Can I do something like that?