ourboard | An online whiteboard
kandi X-RAY | ourboard Summary
kandi X-RAY | ourboard Summary
Feel free to try at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ourboard
ourboard Key Features
ourboard Examples and Code Snippets
Community Discussions
Trending Discussions on ourboard
QUESTION
We just learnt SFML by our own and we are trying to realize a function that is finding a mouse click location and finds it in a rectangle's vector. We are trying to color the outline of the specific rectangle that we're clicking on... This is what we tried to write:
...ANSWER
Answered 2020-Jan-02 at 14:15If m_vecRec[i][j]
is a Shape
or a Sprite
, getGlobalBounds
will return a bounding rectangle. You should be able to call .contains(worldPos)
on that to see if the mouse position is within the shape's bounding box:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ourboard
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page