Solarus-Games English Forum

Solarus => Development => Topic started by: froggy77 on May 18, 2015, 10:23:04 PM

Title: Question: Is it possible to resize a surface?
Post by: froggy77 on May 18, 2015, 10:23:04 PM
Hello,

Is it possible to resize a surface with something like "surface:set_size()" that seems to not exist?

I would like to to do it in a "rebuild_surface' function.


Thanks in advance.
Title: Re: Question: Is it possible to resize a surface?
Post by: Christopho on May 19, 2015, 02:30:15 AM
No, sorry :)
Title: Re: Question: Is it possible to resize a surface?
Post by: froggy77 on May 19, 2015, 07:27:12 PM
It doesn't matter. =>[]:'(
Thank you.
Title: Re: Question: Is it possible to resize a surface?
Post by: Christopho on May 19, 2015, 08:41:27 PM
A workaround is to create a new surface with the wanted size and draw the first one on the new one.
Another workaround is to keep only one surface with the max size and keep unused parts transparent.
Title: Re: Question: Is it possible to resize a surface?
Post by: froggy77 on May 24, 2015, 06:57:07 PM
Ok thank you for your advices. I managed to do what I wanted  :)
I opened a topic to share this little creation HUD: ZL Hearts (http://forum.solarus-games.org/index.php/topic,252.0.html)
If someone finds some bugs , thank you to report it.