Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Dull Image  (Read 1833 times)

0 Members and 1 Guest are viewing this topic.

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Dull Image
« on: January 14, 2011, 07:06:51 am »
I have the frameworks of a game up and running. I want to add a menu to the gameplay window though. I want it to pause the game, open up the menu, and dull the background (the gameplay screen) to be tinted black.

The only way I can think it to set a window sized Rectangle to 50% opacity and overlay it on the gameplay screen. Is there a better way of doing this?
-Wander

Breakman79

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Dull Image
« Reply #1 on: January 14, 2011, 05:46:42 pm »
I believe you can do this with opengl shaders as well.  Take a look at the SFML PostFX class if using 1.6 or the Shaders class if using 2.0

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Dull Image
« Reply #2 on: January 14, 2011, 05:51:20 pm »
Using shaders seems a bit much for what's asked here... If I were you Wander, I would use the idea of the rectangle.
Want to play movies in your SFML application? Check out sfeMovie!

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Dull Image
« Reply #3 on: January 15, 2011, 09:11:12 pm »
Okay. Thanks you two. :)
-Wander

 

anything