bgiIsMouseOverCanvas

Checks if the mouse cursor is currently positioned over a canvas. Takes canvasID (Int). Returns 0.

BGI GUI

Parameters & Returns

Parameters

canvasID Int

Returns

Int

Quick Summary

Checks if the mouse cursor is currently positioned over a canvas. Takes canvasID (Int). Returns 0.

Technical Exegesis...

Checks if the mouse cursor is currently positioned over a canvas. Searches g_canvasMap for canvasID. If not found, returns 0. Calls GetCursorPos to get screen cursor position. If GetCursorPos fails, returns 0. Calls ScreenToClient with canvas hWnd to convert screen coordinates to canvas client-area coordinates. If ScreenToClient fails, returns 0. Checks if cursor is within canvas bounds (cursorPos.x >= 0 && cursorPos.x < width && cursorPos.y >= 0 && cursorPos.y < height).

Example

Example.bam
; No example implemented yet