Page 1 of 1

Sizing a side image? Help!

Posted: Tue Jan 18, 2011 11:37 pm
by drag0n38
Alright so I'm a newbie to Ren'py and I'm working with a few others building a game. I've run into a problem and I can't seem to find the answer. I am trying to have the MC appear on the left of the screen while she is talking. Which I have been able to do. The problem being is she is too big. I'm not sure what is the easiest way to reduce her size and properly code it. My current code I'll post below. Can someone suggest the best way to reduce the size of the image and how to code it?

Code: Select all

$ NMS = Character('Nanami', color="#5CB3FF", window_left_padding=160, show_side_image=Image ("Nanamismile.gif", xalign=0.0, yalign=1.0))

Re: Sizing a side image? Help!

Posted: Wed Jan 19, 2011 5:25 am
by denzil
Use im.FactorScale instead of Image to load the side image. Here width is how much smaller you want the image (0.5 is half, 0.25 would be quarter the size and so on).

Code: Select all

$ NMS = Character('Nanami', color="#5CB3FF", window_left_padding=160, show_side_image=im.FactorScale ("Nanamismile.gif", width=0.5, xalign=0.0, yalign=1.0))

Re: Sizing a side image? Help!

Posted: Wed Jan 19, 2011 10:18 pm
by drag0n38
Thanks denzil, it worked perfectly. Now I can continue and I learned something new!