Touch Controls on Text Links

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
VimislikArt
Regular
Posts: 90
Joined: Sun Mar 06, 2016 6:50 pm
Projects: King of the Cul-De-Sac
Deviantart: vimislikart
itch: vimislikart
Location: Rochester, NY
Contact:

Touch Controls on Text Links

#1 Post by VimislikArt »

My game uses a lot of text links within the "show text" label, as opposed to the default "menu" label, mostly because it's easier to move and adjust the text around the screen as an image using a combination of the Ren'py camera add-on and some simple transforms, like this:

Code: Select all

show text "{a=jump:option1}Option 1 Example{/a}\n\n\n\n{a=jump:option2}Option 2 Example{/a}" onlayer master:
        subpixel True xpos 0.3 ypos 0.5 xanchor 0.5 yanchor 0.5 rotate None
The trouble is, now when I have people use touch controls on tablets, it requires a double input; one press on the screen to highlight the link, and a second press to actually "click" it. I would love to have it be a simple one -button press system, but still like to keep this "show text" format if possible.

Is there anything I can change to make it a single press with touch controls?
Check out my VN, King of the Cul-De-Sac, currently in Open Beta production! Try it out HERE!

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Touch Controls on Text Links

#2 Post by namastaii »

Any reason why you can't use a screen for this?

User avatar
VimislikArt
Regular
Posts: 90
Joined: Sun Mar 06, 2016 6:50 pm
Projects: King of the Cul-De-Sac
Deviantart: vimislikart
itch: vimislikart
Location: Rochester, NY
Contact:

Re: Touch Controls on Text Links

#3 Post by VimislikArt »

namastaii wrote: Fri Jan 03, 2020 9:41 pm Any reason why you can't use a screen for this?
At this point, mostly to avoid a ton of extra work?

My game is setup like a comic book, with lots of floating word balloons placed in different places on the screen. I'm using the Ren'py camera for placement of images and text directly in engine, so I can manipulate their positions right on screen.

Unfortunately, whenever I use the Ren'py camera, it turns off all screens I add to the scene, so in order to keep this sort of dynamic placement, my work process would involve placing the text on screen, place whatever backing elements needed, then turn off that text, and write a screen to try to replicate the original placement of the text based on where the backing elements would be, which is a lot of extra work.

I was sort of hoping there would be some value I could change to screens.rpy that would solve my hyperlink issue?

Code: Select all

label p3_mask_end:
    call balloonclear
    hide text
    show choice1 onlayer master:
        subpixel True xpos 807 ypos 91 xzoom 0.87 yzoom 0.45 rotate None
    show choice2 onlayer master:
        subpixel True xpos 833 ypos 291 xzoom 0.73 yzoom 0.41 rotate None
    show choice3 onlayer master:
        subpixel True xpos 790 ypos 500 xzoom 0.94 yzoom 0.41 rotate None
    call screen p3_mask_end_choicetry
#    show text "{a=jump:p3_just_the_mask}\"The mask\"{/a}\n\n\n\n{a=jump:p3_end_happy}\"Both?\"{/a}\n\n\n\n{a=jump:p3_end_sad}Punch Her{/a}" onlayer master:
#        subpixel True xpos 0.79 ypos 0.5 xanchor 0.5 yanchor 0.5 rotate None
## OLD CODE HERE ^^
    z ""

screen p3_mask_end_choicetry:
    textbutton "\"The mask\"" action Jump("p3_just_the_mask"):
        at transform:
            xpos 0.79 xanchor 0.5 ypos 0.18 zoom 1.2
    textbutton "\"Both?\"" action Jump("p3_end_happy"):
        at transform:
            xpos 0.79 xanchor 0.5  ypos 0.45 zoom 1.2
    textbutton "Punch Her" action Jump("p3_end_sad"):
        at transform:
            xpos 0.79 xanchor 0.5 ypos 0.73 zoom 1.2
Check out my VN, King of the Cul-De-Sac, currently in Open Beta production! Try it out HERE!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Ocelot