I wanted to make a screen that enables you to drag things to a certain position, after you drag the items into the right slot, the plot continues.
https://imgur.com/a/rb97Oa3
https://imgur.com/a/c3qYtp1
this is what i have now
how can I connect the text and the background together? Thanks.
drag-and-drop screen child problem
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.
Re: drag-and-drop screen child problem
here's the code...
I don't really know how to write python, so I used the official document for now
I don't really know how to write python, so I used the official document for now
Code: Select all
init python:
def detective_dragged(drags, drop):
if not drop:
return
store.detective = drags[0].drag_name
store.city = drop.drag_name
return True
Code: Select all
draggroup:
# 我们的侦探。
drag:
drag_name "放下绳结"
#child
child "how_select_hover"
droppable False
dragged detective_dragged
xpos 500 ypos 50
drag:
drag_name "Zack"
child "how_select_hover"
droppable False
dragged detective_dragged
xpos 500 ypos 175
# 他们可以去的城市。
drag:
drag_name "1"
child "how_select_idle"
draggable False
xpos 50 ypos 50
drag:
drag_name "2"
draggable False
child "how_select_idle"
xpos 50 ypos 175
drag:
drag_name "3"
child "how_select_idle"
draggable False
xpos 50 ypos 300
drag:
drag_name "4"
draggable False
child "how_select_idle"
xpos 50 ypos 425
drag:
drag_name "5"
draggable False
child "how_select_idle"
xpos 50 ypos 550
Re: drag-and-drop screen child problem
Two solutions.
One is to draw buttons with text on it already (not translable and not programmatical, but easier).
The other is to use as CHILD a frame displayable, that use that button as image and contain the text. Complex, and i dunno from where you retrieve the text, so no code for the moment.
One is to draw buttons with text on it already (not translable and not programmatical, but easier).
The other is to use as CHILD a frame displayable, that use that button as image and contain the text. Complex, and i dunno from where you retrieve the text, so no code for the moment.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
10 ? "RENPY"
20 GOTO 10
RUN
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]