I tried to scale a frame in a screen and i noticed it doesn't do the math correctly, isn't that how percentage is done it python?
do I have to do x*.5 the crude way?: x*50/100
[solved] xsize(1000*0.5)
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.
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
[solved] xsize(1000*0.5)
Last edited by Kia on Tue Jul 31, 2018 1:21 am, edited 1 time in total.
Re: xsize(1000*0.5)
You haven’t posted the exact code you’re using, so it’s hard to know exactly what to advise you to do. However, Renpy frequently interprets integers and floating point numbers to mean different things. (Pixels vs screen fractions)
1000*0.5 will result in a float, while 1000/2 or 1000*50/100 will result in integers. This might be part of your issue.
1000*0.5 will result in a float, while 1000/2 or 1000*50/100 will result in integers. This might be part of your issue.
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: xsize(1000*0.5)
I didn't notice the type mismatch, thanks ^_^
here's the full, fixed code:
it was just a test to see if it's possible
here's the full, fixed code:
Code: Select all
screen titledwindow(fac):
frame:
background "#0008" xsize int(1000*fac)
vbox:
text "title"
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]