Mouse position: Difference between revisions

No edit summary
Line 797:
117,394 -- relative to current window
148,521 -- relative to current screen
 
</lang>
=={{header|LiveCode Builder}}==
<lang LiveCode Builder>
LiveCode Builder (LCB) is a slightly lower level, strictly typed variant of LiveCode Script (LCS) used for making add-on extensions to LiveCode Script
 
-- results will be a point array struct like [117.0000,394.0000] relative to the current widget's view port
use com.livecode.widget -- include the required module
--- in your handler:
variable tPosition as Point -- type declaration, a rect array struct, something like [0,1024,0,768]
put the mouse position into tPosition
variable tRect as Rectangle -- type declaration
put my bounds into tRect
if tPosition is within tRect then
log "mouse position is within the widget bounds"
end if
 
</lang>