[ Back ]
Zones are mainly meant to be used for buttons.
procedure create zone zone_id, x, y, w, h
procedure free zone zone_id
function zone(x, y)
function zonex(zone_id), function zoney(zone_id), function zonew(zone_id), function zoneh(zone_id)
Create zone zone_id at x, y and set its width and height to w, h. The id shouldn't be set to 0.
Free zone zone_id. All zones are automaticly freed when program exits.
Return id of any zone at position x, y. If the coordinates are not inside any zone, 0 is returned.
Return status of zone zone_id. If 0 is return, the cursor is not inside the zone, or the zone does not exist. If 1 is returned, the cursor is inside the zone, but no mouse button is pressed. 2 means that the cursor is inside the zone and the mouse button is pressed.
Return the id of the latest zone that was clicked on (mouse down and up while cursor was inside the zone). Each click is only reported once. 0 is returned if no zone click has been generated since last time the function was called.
These functions return the x position, y position, width and height of zone zone_id.
[ Back ]