Hiding textbox on Android Devices?

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
JimPanse
Newbie
Posts: 13
Joined: Wed Apr 28, 2021 1:36 pm
Contact:

Hiding textbox on Android Devices?

#1 Post by JimPanse »

Hey guys,

just a quick questions out of curiosity. I've noticed that there isn't a hide button for the textbox on Android devices. It also seems like there is no gesture or tap sequence that would hide the textbox.

Doesn't Renpy allow this in general on mobile devices (or Android only) or is there a special setting for that anywhere?

Kind Regards

dasauto1
Regular
Posts: 38
Joined: Sun Oct 31, 2021 2:26 pm
Contact:

Re: Hiding textbox on Android Devices?

#2 Post by dasauto1 »

I'm not sure if this helps but you can make an if statement to know what platform the user is currently using.

Code: Select all

if renpy.variant("android") : ...

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

Re: Hiding textbox on Android Devices?

#3 Post by Imperf3kt »

JimPanse wrote: Mon Nov 15, 2021 12:38 am Hey guys,

just a quick questions out of curiosity. I've noticed that there isn't a hide button for the textbox on Android devices. It also seems like there is no gesture or tap sequence that would hide the textbox.

Doesn't Renpy allow this in general on mobile devices (or Android only) or is there a special setting for that anywhere?

Kind Regards
By default, there is no button for this (H still works if you plug un a USB keyboard or use a bluetooth keyboard)

You could assign it to a gesture.
https://www.renpy.org/doc/html/gesture.html

For example, this will assign rollback to swiping right, and roll-forward to swiping left

Code: Select all

define config.gestures = { "e" : "rollback" , "w" : "rollforward" }
define config.dispatch_gesture = None
I'm not sure how to get it to do what you need (hide the say screen), but this might work. I haven't fiddled with gestures in a long time, so this may be inaccurate.
https://www.renpy.org/dev-doc/html/keymap.html

Code: Select all

define config.gestures = { "e" : "hide_windows" }
define config.dispatch_gesture = None
You can set it to any combination you want. If you want people to draw a clockwise square, starting by moving right for it to work, use e_s_w_n, for example.
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
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: Hiding textbox on Android Devices?

#4 Post by tiya_nofurita »

just make a button somewhere that define HideInterface()
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

JimPanse
Newbie
Posts: 13
Joined: Wed Apr 28, 2021 1:36 pm
Contact:

Re: Hiding textbox on Android Devices?

#5 Post by JimPanse »

Thanks guys for all your answers, that really helped me out.

Code: Select all

define config.gestures = { "e" : "hide_windows" }
define config.dispatch_gesture = None
I went for your solution Imperf3kt and it seems to work fine. Set the gesture config to "n" and tested it on my phone.
Now when I slide up, all of the interface is hidden. That's really cool, so thanks a bunch mate :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]