|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| num.isInRect(px,py, x,y, w,h) |
Parameters
| INT | px,py | Coordinates of the first point.
| | INT | x,y | Coordinates of the upper-left corner of a rectangle.
| | INT | w,h | Size of the rectangle. |
Return value
Description
Returns true if a point (px, py) is included in a rectangle (x, y, w, h).
This function is generally used to check if the mouse is in a rectangle.
Note: This function is defined in the library klib.k and is linked automatically. |
MioScript Sample Code
// To something when the user clicks inside a rectangle.
event.mouse:click
&mx = mouse.main.x()
&my = mouse.main.y()
if(num.isInRect(&mx, &my, 10,10,20,20))
...
if.end
event.end |
|
|
|