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.
AnnieJuraski wrote: ↑Sun Mar 17, 2024 1:28 pm
I want main_menu to have different font effect from preferences menu... How to achieve that? I tried change this, but it change all menu:
And I also want to change the font where it is written "velocidade do texto" (equivalent to text speed) in the attachment. How to change that?
You need to learn how "style properties" work.
Run Ren'Py SDK Launcher and select "Tutorial".
Launch it.
Start the Tutorial game, and soon you will see the menu with Styles and Style Properties
Then you will know how to use "style" and "style_prefix" to modify several text labels at once, and how to add individual style properties to one text label.
For example, in file "screens.rpy" there is a line
AnnieJuraski wrote: ↑Sun Mar 17, 2024 1:28 pm
I want main_menu to have different font effect from preferences menu... How to achieve that? I tried change this, but it change all menu:
And I also want to change the font where it is written "velocidade do texto" (equivalent to text speed) in the attachment. How to change that?
You need to learn how "style properties" work.
Run Ren'Py SDK Launcher and select "Tutorial".
Launch it.
Start the Tutorial game, and soon you will see the menu with Styles and Style Properties
Then you will know how to use "style" and "style_prefix" to modify several text labels at once, and how to add individual style properties to one text label.
For example, in file "screens.rpy" there is a line
screen main_menu():
## Isso garante que qualquer outra tela de menu seja substituída.
tag menu
add gui.main_menu_background
## Esse quadro vazio escurece o menu principal.
frame:
style "main_menu_frame"
## A instrução de uso inclui outra tela dentro desta. O conteúdo real do
## menu principal está na tela de navegação.
#use navigation
vbox:
style_prefix "navigation"
style "main_menu_button"
yalign 0.85
xalign 0.5
spacing gui.navigation_spacing
if main_menu:
textbutton _("Início") action Start()
else:
textbutton _("Histórico") action ShowMenu("history")
textbutton _("Salvar") action ShowMenu("save")
textbutton _("Carregar") action ShowMenu("load")
textbutton _("Preferências") action ShowMenu("preferences")
if _in_replay:
textbutton _("Fim da reprodução") action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Menu principal") action MainMenu()
textbutton _("Sobre") action ShowMenu("about")
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
## A ajuda não é necessária ou relevante para dispositivos móveis.
textbutton _("Ajuda") action ShowMenu("help")
if renpy.variant("pc"):
## O botão Sair é proibido no iOS e desnecessário no Android e na
## Web.
textbutton _("Sair") action Quit(confirm=not main_menu)
if gui.show_name:
vbox:
style "main_menu_vbox"
text "[config.name!t]":
style "main_menu_title"
text "[config.version]":
style "main_menu_version"
Also I created a custom style and don't know how to use it