[XP] Showing Picture in Menu Background Help!

Started by CountVlad, May 31, 2010, 06:20:04 am

Previous topic - Next topic

CountVlad

May 31, 2010, 06:20:04 am Last Edit: June 01, 2010, 11:17:50 am by CountVlad
Hi,

I've been trying to improve the resolution of menu graphics by telling the windows that make up the menu screens (e.g. save screen, pause menu, inventory, etc.) to be transparent and then using...

    @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.windowskin("name of background image stored in windowskin folder")


... in one of the Window scripts to display an image in the background. I found out that I had to put this particular bit of script actually in the Window script instead of the Scene script because otherwise it would be referring to something that doesn't exist within that script.
This, however, causes problems because some Window scripts are used by more than one Scene, which means that if (for example) I have a background tailored to the inventory then if I try to change hotkeys (using BlizzABS), the Inventory background image will be displayed because both scripts use "Window_Item".

Ok, now for the question. Is there a way of putting the above script (along with disposing it when you close the scene) directly into a Scene script and getting it to display a picture in the background?

Screenies:

Spoiler: ShowHide




EDIT: Never mind, I worked out a way around the problem.

ForeverZer0

June 09, 2010, 06:25:23 pm #1 Last Edit: June 09, 2010, 06:26:49 pm by ForeverZero
Make the sprite a global variable ($), and make it a condition to be made, like this...
if $backgound == nil
$background = Sprite.new
# etc, etc.
end


I did something very similar in the MapBack Scene Converter in Zer0 Add-On Collection. See that for an example.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.