How do I apply 9scale sprite on ren'py?

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.
Post Reply
Message
Author
LinkStar
Newbie
Posts: 1
Joined: Sun Dec 17, 2017 7:42 pm
Github: Scincy
Skype: linkmarker
Contact:

How do I apply 9scale sprite on ren'py?

#1 Post by LinkStar »

Hi, I am new to ren'py and I am not well using english(sorry)

I am planning to make message system in my Visual Novel Game. This system looks similar to the online chat app we used all the time.
However, I have encountered difficulties in creating this function. Because Ren'py seems to not supporting 9 scale image. And, if I make this system and apply it to making each image and text, too much resources will be wasted.

So is there any idea to make this method? Please help me.
Plus. I don't want to slice or change my text background image. and this function's UI has round corner.( when i just resize image, corner become bigger horizontal or vertical or both of them and looks different other text image.)

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How do I apply 9scale sprite on ren'py?

#2 Post by Remix »

The Frame container of Ren'py supports the scaling you want, just it does not interpret the border sizes from reading the input image like 9scale/9-patch does on android.

background Frame("bg.png", 16, 12) # ( image, left (and right), top (and base) )

If people know a way to read the colour of each pixel in an image it should be quite straight forward to extend Frame though or just pre interpret and pass the values to Frame
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Google [Bot], Sugar_and_rice