Fading everything under a GUI...whats the "fastest" way? **SOLVED**

Started by Knox, Fri 20/08/2010 16:32:04

Previous topic - Next topic

Knox

Hi,

Ive got a mouse mode that permits the player to discard items from the inventory. When you click on an item to discard, the screen fades 75% black in 1 second, and then the confirm box GUI opens up over the darkened screen...when the confirm box GUI finally gets closed, everything goes back to its normal lightness, in 1 second.

Right now what Im doing is I have a gui called "gBlack" 1024x768 (the full size of my screen) and I tween its transparency (with the Tween module) on top of everything at 75%, in 1 second...and then I open my confirm box GUI over it (z orders are set so everything is in the right order)...when its time to return everything to normal, I just tween the gBlack GUI back to fully transparent (and then set its visibility to false).

The thing is, it seems kind of slow since Im tweening the GUI "gBlack" (which is a full-screen GUI) over other gui's that have tweened animations running in "eRepeatTween"...I heard somewhere that tweening GUI's can be slow(?)

My question is, is there a better, faster/simpler way of doing this?

I tried "TintScreen" but I can't get it to only tint the screen behind the confirm box GUI...it tints everything :P

ps: Ive got animation going on in the background so Im not sure if saving a darkened version with a dynamic sprite is what Im looking for...I still would like to see the animation going on while everything that is behind the confirm box GUI is 75% darkened.


--the confirm box isnt darkened...what's behind it, is
--All that is necessary for evil to triumph is for good men to do nothing.

Joe

I think this is the best way, because creating an overlay would also fade the confirm gui... so that's fine
Copinstar © Oficial Site

GarageGothic

Yeah, I also found a transparent GUI to be the fastest and most flexible solution. Just to check - you *are* simply using black GUI background color, not a black full-screen sprite as background graphic, right? I've never had speed problems myself with this approach, but then I've never tried it on a higher resolution than 640x480.

Knox

Ok, Ill use this way then since you guys are already doing it this way!
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk