Adding Date to The 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.
Adding Date to The Screen
I'm trying to add a simple date widget to the dialogue screen like below, I have checked other tutorials but they all seemed too complex for what I wanted, does anyone have any idea how to make one like this? :(
-
rayminator
- Miko-Class Veteran
- Posts: 754
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Adding Date to The Screen
this one way of doing it but there are other ways too
I don't know how you setting up your variables
you can do it like this
I don't know how you setting up your variables
you can do it like this
Code: Select all
text "[date][day][month]"Re: Adding Date to The Screen
The simplest thing you can do is create a screen that receives the day of the week, the date and the day. you call the screen and pass it the data you want to show. but if your game needs to control events per day you will have to implement a calendar.
This is an example of what can be done with the screen languages https://www.renpy.org/doc/html/screens.html
The data that you have to pass to this screen has to be strings.
You can also pass viable to the screen, but the text declarations will have to be modified like this:
You can change the positions check the Position Style Properties section https://www.renpy.org/doc/html/style_pr ... properties
Just show the screen with:
and hide the screen with:
This is an example of what can be done with the screen languages https://www.renpy.org/doc/html/screens.html
Code: Select all
screen today(day_week, date, day)
frame:
background "gui/myimage.png"
xalign 0.98
yalign 0.02
xysize(450, 100)
fixed:
text day_week xalign 0.2 yalign 0.2
text date xalign 0.8 yalign 0.2
text day xalign 0.5 yalign 0.8
You can also pass viable to the screen, but the text declarations will have to be modified like this:
Code: Select all
text "[variable]"Just show the screen with:
Code: Select all
show screen today("Monday", "04TH", "Day 01")Code: Select all
hide screen todayRe: Adding Date to The Screen
Thank you both so much for the help! I got it working 
Who is online
Users browsing this forum: Google [Bot]