monitor¶
Where the monitor the game is on sits, and how big it is. Read only - for placing windows and pop-outs exactly.
How to use it
Read only, in desktop pixels. Use it to place the window or a pop-out somewhere on the screen, whatever its size.
Example code¶
-- Pop-out 0 into the monitor's top left corner, 150 pixels in.
popout[0].show = "opponent"
popout[0].x = monitor.x + 150 - popout[0].homeX
popout[0].y = monitor.y + 150 - popout[0].homeY
Properties¶
| Property | Kind | Default | |
|---|---|---|---|
| monitor.x | number, read | 0 |
Its left edge on the desktop, in pixels. |
| monitor.y | number, read | 0 |
Its top edge on the desktop, in pixels. |
| monitor.width | number, read | 0 |
Its width in pixels. |
| monitor.height | number, read | 0 |
Its height in pixels. |
monitor.x¶
number monitor.x = 0
Its left edge on the desktop, in pixels.
monitor.y¶
number monitor.y = 0
Its top edge on the desktop, in pixels.
monitor.width¶
number monitor.width = 0
Its width in pixels.
monitor.height¶
number monitor.height = 0
Its height in pixels.