struct

Term2::ZoneInfo

Inherits Struct < Value < Object

Zone info for tracking interactive regions

Constructors

new(id : String, start_x : Int32, start_y : Int32, end_x : Int32, end_y : Int32, z_index : Int32 = 0)
Source

Instance methods

end_x
Source
end_y
Source
height
Source
in_bounds?(x : Int32, y : Int32) : Bool
Source
in_bounds?(event : MouseEvent) : Bool
Source
is_zero?

Returns true if the zone isn't known yet (is zero)

Source
pos(x : Int32, y : Int32) : Tuple(Int32, Int32)

Returns the coordinates relative to the zone, with a basis of (0, 0) being the top left cell of the zone. If the zone is not known, or the coordinates are not in the bounds of the zone, returns (-1, -1).

Source
pos(event : MouseEvent) : Tuple(Int32, Int32)
Source
start_x
Source
start_y
Source
width
Source
z_index
Source
zero?
Source