Can't find mouse out of window post
BlitzMax Forums/BlitzMax Programming/Can't find mouse out of window post
| ||
I saw it in here but now I can't find it. How to detect if the mouse has left the BMax window (in windowed mode)? |
| ||
if xmouse() > windowwidth or xmouse() < 0 or ymouse() > windowheight or ymouse() < 0 ? |
| ||
I'm pretty sure that doesn't work unless the mouse button is down Kronholm :( At least in my project, the mouse stops returning values when it leaves the window, unless I have a mouse button down. Pain in the arse. maybe Externing some api might fix it... |
| ||
Does this help?Graphics 800,600,0 Local mousepos:String="IN" While Not KeyHit(KEY_ESCAPE) Cls PollEvent() Select EventID() Case EVENT_MOUSEENTER mousepos="IN" Case EVENT_MOUSELEAVE MOUSEPOS="OUT" End Select DrawText MOUSEPOS,0,0 Flip WendIf not, take deep breaths :) <edit> and please let it drop and not post any more derogatory remarks (witty or not) in unrelated posts. |
| ||
That's it I think. I saw that exact code in another post somewhere but couldn't find it again. Thanks. and please let it drop and not post any more derogatory remarks (witty or not) in unrelated posts. Gah, still bringing that up? Let it rest man. Long as you're nice I am too. :) |