Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Making a picture as a window background.

I'm using this Mail Client script and want to adjust the the windows.  I want there to be an image in the background instead of the windowskin.
This is what the letter looks like:
http://img164.imageshack.us/img164/4498/mailboxlettervs5.th.png[/img]
This is what I want to be in the background:
http://img175.imageshack.us/img175/9287/papergm7.th.png[/img]
I'll later make a background for the main part of the Mailbox client, which looks like:
http://img107.imageshack.us/img107/5249/mailboxmainar8.th.png[/img]
With the main part of this client, I think that there are two windows, so I'm not sure how hard that will be to modify that.
I'm trying to modify all of the scripts I use to have different backgrounds, so any help would be greatly appreciated.
 
Inside the scene you use, add the lines:
Code:
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("namewithoutextensionhere")
Make sure you set the opacity of your main window(s) to 0, as in:
Code:
@main_window.opacity = 0 # whereas @main_window is different in your scene I presume
Also don't forget to dispose the background. Where you find everything else disposed, add:
Code:
@background.dispose
If you're experiencing problems, give me a shout.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top