Page 1 of 1

get a drag's position?

Posted: Sat Sep 22, 2018 12:59 pm
by Kia
is there a way to get a drag's position as it moves?
I imagine it's something like _get_pos(dr) but I can't find anything related to it anywhere

Code: Select all

default dr_x = 0
screen resize_frame:
    timer .1 repeat True action SetVariable("dr_x", ???? )
    drag:
        id "dr"
        frame:
            xysize(40,40)

Re: get a drag's position?

Posted: Sat Sep 22, 2018 1:08 pm
by Andredron
Kia wrote: Sat Sep 22, 2018 12:59 pm is there a way to get a drag's position as it moves?
I imagine it's something like _get_pos(dr) but I can't find anything related to it anywhere

Code: Select all

default dr_x = 0
screen resize_frame:
    timer .1 repeat True action SetVariable("dr_x", ???? )
    drag:
        id "dr"
        frame:
            xysize(40,40)
In forum project Spline Editor,

https://vk.com/wall-7553243_30858

And

3d camera
viewtopic.php?f=8&t=29778

Re: get a drag's position?

Posted: Sat Sep 22, 2018 2:03 pm
by Kia
those are a ton of code without one drag object in the screens, isn't there something simpler for this simple need?

Re: get a drag's position?

Posted: Sun Sep 23, 2018 3:40 am
by Andredron
Kia wrote: Sat Sep 22, 2018 2:03 pm those are a ton of code without one drag object in the screens, isn't there something simpler for this simple need?
x, y = renpy.get_mouse_pos()

https://www.renpy.org/doc/html/other.ht ... _mouse_pos