Hello,
I am new to the screen side of renpy and in my current project I need to have different fonts on each of the menu's e.g. preferences/about/help ect.. Basically I would like one font for the main menu and then different fonts for the in game menu and any frame pop ups I need.
Ideally I would like a way to do this without going to image maps.
I have looked at the documentation several times but cannot get my head around how to do what I'm trying to. I'm not the most amazing person at understanding coding so please try to keep answers simple.
Thanks!
Different fonts for each menu screen.
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.
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.
- Empish
- Veteran
- Posts: 221
- Joined: Thu Jan 14, 2016 9:52 pm
- Projects: Efemural Hearts, It Ends With Graduation
- itch: empish
- Contact:
Re: Different fonts for each menu screen.
You can change a text's font like so:
You can also use styles and style prefixes to reduce the amount of typing you need to do.
Code: Select all
text "sometext"
font "somefont.ttf"
Re: Different fonts for each menu screen.
The problem is I don't understand the style and style prefix and how to set these up, I have looked at the documentation and looked at people who want similar things but nothing helps.
Below is an example of what I want, at the moment the font for these is the interface font and I want it to be another one, please could you be abit more specific or in depth.
Thanks!
Below is an example of what I want, at the moment the font for these is the interface font and I want it to be another one, please could you be abit more specific or in depth.
Thanks!
Code: Select all
screen mailbox_commands:
hbox:
if available_drafts:
textbutton "Draft New" action Show("contacts")
else:
textbutton "Draft New" action None
if current_message and current_message.reply_label:
textbutton "Reply" action current_message.reply
else:
textbutton "Reply" action None
if current_message:
textbutton "Delete" action [current_message.delete, SetScreenVariable("current_message", None)]
else:
textbutton "Delete" action None
if new_message_count() > 0:
textbutton "Mark All Read" action mark_all_read
else:
textbutton "Mark All Read" action None
textbutton "Restore All" action restore_all
textbutton "Exit" action Hide("mailbox")
- Empish
- Veteran
- Posts: 221
- Joined: Thu Jan 14, 2016 9:52 pm
- Projects: Efemural Hearts, It Ends With Graduation
- itch: empish
- Contact:
Re: Different fonts for each menu screen.
Code: Select all
style mailbox_button:
font "somefont.ttf"
Code: Select all
screen mailbox_commands:
style_prefix "mailbox"
#rest of the screen goes here
Who is online
Users browsing this forum: Google [Bot], Kocker, piinkpuddiin, Semrush [Bot]