Opening the menu on Android/Apple Devices Via Touch Input

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.
Message
Author
crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#16 Post by crimsonnight »

Nothing seems to be happening at all with the current code :?
alwaysthesamebluesky.com

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#17 Post by DragoonHP »

So looks like the screen is not being shown for some reason

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#18 Post by crimsonnight »

Has anyone been able to accomplish opening the menu via touch controls on their device?
alwaysthesamebluesky.com

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#19 Post by Imperf3kt »

crimsonnight wrote: Fri Jan 26, 2018 5:33 am Has anyone been able to accomplish opening the menu via touch controls on their device?
It works for me, but I notice I have to press anything at least once first, then after that alternate clicks work. Maybe a bug?

An easy workaround on mobiles, is to include a screen that shows before the main menu with a single button along the lines of 'touch to start'
You can probably do this by including the label 'before_main_menu', which you would include a call to a screen that has a single button, the action of which hides the screen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#20 Post by Remix »

First check the overlay is actually there...

Code: Select all

screen android_overlay():
    button:
        background Solid('#5D99') # <--- this will paint everything semi transparent green
        alternate ShowMenu( 'save' )

init python:
    config.overlay_screens.append( "android_overlay" ) # <--- ignoring the test for now
If/when that works, try adding the overlay test ( the -- if renpy.variant( [ "touch", "android" ] ): -- bit )
If the test is preventing it from showing, try tweaking the conditions
Frameworks & Scriptlets:

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Opening the menu on Android/Apple Devices Via Touch Input

#21 Post by crimsonnight »

Interesting, it's only appearing at the top of the screen for some reason: https://puu.sh/za8Hk/8b34e0f9f9.jpg

Maybe the fact that I'm using other overlays is screwing things up somewhere? Maybe forcing this overlay to the front will solve it?
alwaysthesamebluesky.com

Post Reply

Who is online

Users browsing this forum: Bing [Bot]