Change the position of the Back button

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
Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Change the position of the Back button

#1 Post by Line of lust »

Hello, I had a problem, I placed the text next to the main menu, but it looks uneven in the mobile version, how can I fix it and attach it to the menu?

And I faced the problem of accessing the menu from the Android version, I want to add the settings icon when you are sitting on the phone during the game, but I can’t find the function, I will be very grateful for the help!

Image

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#2 Post by Line of lust »

Help

User avatar
papillon
Arbiter of the Internets
Posts: 4107
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Change the position of the Back button

#3 Post by papillon »

Line of lust wrote: Fri Nov 08, 2019 3:03 pm Hello, I had a problem, I placed the text next to the main menu, but it looks uneven in the mobile version, how can I fix it and attach it to the menu?
What code are you currently using? What does it currently look like, and what do you want it to look like?

RIght now, when you say you "placed the text next to the main menu", I have no idea what you mean. Which main menu, where? What text? What does 'it looks uneven' mean?

The more details you provide the easier it will be to see what needs fixing.

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Change the position of the Back button

#4 Post by XxrenxX »

You can always add xalign 0.5 to the style for the buttons to make them all centered.

As for the settings button, you'd have to make a button the player can click, I assume you want it always present so it would be something similar to the quick menu that's always present on the dialogue box. Am I understanding correctly?

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Change the position of the Back button

#5 Post by isobellesophia »

Pc and Android were in different positions, so i suggest you to edit the screen.rpy or the gui.rpy for android version, supposed to be you need to use xaligns for simple.


Plus, might be better if you showed the code so it can be specific.
I am a friendly user, please respect and have a good day.


Image

Image


Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#6 Post by Line of lust »

papillon wrote: Sat Nov 09, 2019 3:30 pm
Line of lust wrote: Fri Nov 08, 2019 3:03 pm Hello, I had a problem, I placed the text next to the main menu, but it looks uneven in the mobile version, how can I fix it and attach it to the menu?
What code are you currently using? What does it currently look like, and what do you want it to look like?

RIght now, when you say you "placed the text next to the main menu", I have no idea what you mean. Which main menu, where? What text? What does 'it looks uneven' mean?

The more details you provide the easier it will be to see what needs fixing.
The button itself is in screen game_menu, and I need this button to function along with main_menu, as I described above, but if I remove from game_menu, I can’t return from the section to the main menu ...

Image
Image

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#7 Post by Line of lust »

XxrenxX wrote: Sat Nov 09, 2019 3:32 pm You can always add xalign 0.5 to the style for the buttons to make them all centered.

As for the settings button, you'd have to make a button the player can click, I assume you want it always present so it would be something similar to the quick menu that's always present on the dialogue box. Am I understanding correctly?
The button itself is in screen game_menu, and I need this button to function along with main_menu, as I described above, but if I remove from game_menu, I can’t return from the section to the main menu ...

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#8 Post by Line of lust »

isobellesophia wrote: Sat Nov 09, 2019 7:23 pm Pc and Android were in different positions, so i suggest you to edit the screen.rpy or the gui.rpy for android version, supposed to be you need to use xaligns for simple.


Plus, might be better if you showed the code so it can be specific.
The button itself is in screen game_menu, and I need this button to function along with main_menu, as I described above, but if I remove from game_menu, I can’t return from the section to the main menu ...

User avatar
papillon
Arbiter of the Internets
Posts: 4107
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Change the position of the Back button

#9 Post by papillon »

Sorry, it is difficult to explain code situations with a slight language barrier. I'm having trouble understanding what you mean, exactly. I can see that the text is misaligned in the screenshot that you've posted, but I can't see what that screenshot is meant to be of, or what code is drawing it.

You've pasted the code for the navigation screen but you haven't pasted the code for the screen that your return button is actually inside? The code you've screenshotted says nothing about where the return button is being placed.

A larger section of your screens.rpy (as text so that we can paste and edit) might help.

Right now my best guess (which may be wrong) is that you've tried to insert a button into the generic game_menu screen which gets used for multiple purposes, and therefore it's coming out in strange places? It is probably better to manually insert it into the specific screens that you want it to be in, so that it can line up properly with the elements of those screens.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Change the position of the Back button

#10 Post by isobellesophia »

If you please dont post thrice in your same post, all of people seen this can still help you out.




How about if you try replace it with the default main menu button code as in like in the new project?
Maybe it is something within your code.. and you may dont know if that code was affecting it.
I am a friendly user, please respect and have a good day.


Image

Image


Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#11 Post by Line of lust »

papillon wrote: Mon Nov 11, 2019 10:40 am Sorry, it is difficult to explain code situations with a slight language barrier. I'm having trouble understanding what you mean, exactly. I can see that the text is misaligned in the screenshot that you've posted, but I can't see what that screenshot is meant to be of, or what code is drawing it.

You've pasted the code for the navigation screen but you haven't pasted the code for the screen that your return button is actually inside? The code you've screenshotted says nothing about where the return button is being placed.

A larger section of your screens.rpy (as text so that we can paste and edit) might help.

Right now my best guess (which may be wrong) is that you've tried to insert a button into the generic game_menu screen which gets used for multiple purposes, and therefore it's coming out in strange places? It is probably better to manually insert it into the specific screens that you want it to be in, so that it can line up properly with the elements of those screens.
screen game_menu:

Image

screen main menu/navigation:

Image

Here are the screens, and where the arrow indicates, there should be a script from game_menu, but if I transfer it there, then when I go to the section through the main menu I will not see this code from game_menu. I hope you understand, if not, I will try to explain on my fingers ...

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#12 Post by Line of lust »

help me please

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Change the position of the Back button

#13 Post by Line of lust »

close

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Ocelot