1
Graphics / CopyScreen y position not working
« on: July 15, 2011, 04:03:42 pm »
Thanks! It works great now!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I think that a custom function would be the best...
http://www.deadbeef.com/converting_rgb_to_hsv_in_c/
http://serennu.com/colour/rgbtohsl.php
http://130.113.54.154/~monger/hsl-rgb.html
//taking a copyscreen of fourth quarter:
screen.CopyScreen(window, sf::IntRect( 600/2, 0, 300, 200) ); //this gives correct result
screen.CopyScreen(window, sf::IntRect( 600/2, 400/2, 300, 200) ); //this should be the correct code
sf::Color test(20,20,20);
test = test * 1.5;
if(someButtonBool){
std::ofstream file("debug.txt");
sf::Err().rdbuf(file.rdbuf());
file.close();
}
You're doing it wrongCode: [Select]std::ofstream file("debug.txt");
sf::Err().rdbuf(file.rdbuf());
if (event.Type == sf::Event::TextEntered){
if (event.Text.Unicode == 8 ){ //8 is 'enter' in this example
... do stuff...
}
}