Greying out the screen to display menu text

Hi Everyone,

I'm developing a game which has a bright vibrant look. When I press the escape key it pauses the game and displays the menu options.

My problem if that the menu text is lost amongst the game's graphics.

Is there a way to put a grey filter over the whole game's graphics, so that the menu text stands out?

Thanks

Neil
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
Okay, the simplest way to do this is simply to have a controller object that draws a black (or gray) rectangle over the screen with an alpha of 0.5 or something like that (make sure that the controller object is on a layer below the menu objects but above the stuff you want to dim). This will dim whatever is underneath and make any menu text stand out. You can also use a shader and apply that to the application surface to make everything grey and then draw over the top (i'm pretty sure there are some free shaders on the marketplace that doe this, but it's slightly more complex than simply drawing a low alpha rectangle.).
 
Top