Advertisement
spacechase0

Time Gradient

Oct 8th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. void SceneGame::DrawTime( sf::RenderWindow& window )
  2. {
  3.     int px = ( time / 5 );
  4.     sf::Color mix = timeGradient.GetPixel( 0, px );
  5.    
  6.     sf::Shape shape = sf::Shape::Rectangle( 0, 0, Game::WindowSize.x + 2, Game::WindowSize.y - 64 + 1, mix );
  7.     shape.SetBlendMode( sf::Blend::Alpha );
  8.     window.Draw( shape );
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement