SFML community forums

Help => Graphics => Topic started by: gmysu on August 24, 2012, 03:56:15 pm

Title: bounding boxes problem
Post by: gmysu on August 24, 2012, 03:56:15 pm
hello,

im writing a fancy little gui system for my personal use. the problem is is the bounding box contains method only works ovet the left and right side of my rectangle (it returns true only there). what is the problem?

if( (buttonBorder->getGlobalBounds()).contains(mouseX,mouseY) ){
                                std::cout << "click!" << std::endl;
                                mouseClick = true;
                        }
 

help me please, it drives me nuts :)

EDIT: solved, i passed mouse x twice :).