/datum/hud_zone
The internal datum representation of a hud zone
Vars | |
coords | Assoc list with format list(x_low = num, y_low = num, x_high = num, y_high = num) , 1-indexed |
---|---|
elements | Assoc list of "elem_alias" = /datum/hud_element elements |
horizontal_edge | What horizontal side of the hud zone are new elements added from? can be "EAST" or "WEST" |
horizontal_offset | Current relative horizontal offset to place new elements at |
ignore_overlap | Did this hud zone ignore overlapping zones on creation? |
master | What's the master /datum/hud this lives in? |
name | What this hud_zone is indexed with in the hud_zones list |
vertical_edge | What vertical side of the hud zone are new elements added from? can be "NORTH" or "SOUTH" |
vertical_offset | Current relative vertical offset to place new elements at |
Procs | |
add_elem_no_adjust | Adds an element without adjusting positions automatically - manually set instead. no safety checking |
add_element | Adds the element to zone_alias with alias elem_alias |
adjust_offset | internal use only. accepts an element and tries to position that element in the zone based on current element positions. |
deregister_element | |
deregister_element_no_adjust | Removes an element without adjusting positions automatically - will probably fuck stuff up if theres any dynamically positioned elements |
ensure_empty | Argument: The datum/hud_element we're adding |
get_element | Returns the /datum/hud_element with alias elem_alias , null if passed improper args |
recalculate_offsets | Internal use only. Recalculates all offsets for the elements |
register_element | |
remove_element | Removes the element with alias elem_alias |
set_elem_position | Used to manually set the position of an element relative to the BOTTOM LEFT corner of a hud zone. no safety checks |
Var Details
coords
Assoc list with format list(x_low = num, y_low = num, x_high = num, y_high = num)
, 1-indexed
elements
Assoc list of "elem_alias" = /datum/hud_element
elements
horizontal_edge
What horizontal side of the hud zone are new elements added from? can be "EAST"
or "WEST"
horizontal_offset
Current relative horizontal offset to place new elements at
ignore_overlap
Did this hud zone ignore overlapping zones on creation?
master
What's the master /datum/hud this lives in?
name
What this hud_zone is indexed with in the hud_zones list
vertical_edge
What vertical side of the hud zone are new elements added from? can be "NORTH"
or "SOUTH"
vertical_offset
Current relative vertical offset to place new elements at
Proc Details
add_elem_no_adjust
Adds an element without adjusting positions automatically - manually set instead. no safety checking
add_element
Adds the element
to zone_alias
with alias elem_alias
Pass ignore_area = TRUE
if you want to ignore bounds checks.
Returns: null
if passed bad arguments, FALSE
if there was an error, TRUE
otherwise
adjust_offset
internal use only. accepts an element and tries to position that element in the zone based on current element positions.
deregister_element
Deregisters a hud element associated with elem_alias
Returns null
if passed improper args, TRUE
otherwise
deregister_element_no_adjust
Removes an element without adjusting positions automatically - will probably fuck stuff up if theres any dynamically positioned elements
ensure_empty
Argument: The datum/hud_element
we're adding
Returns HUD_ZONE_FULL
if completely full,
HUD_ZONE_WRAPAROUND
if it needed to wrap around to a new vertical layer,
and HUD_ZONE_EMPTY
if it was empty.
get_element
Returns the /datum/hud_element
with alias elem_alias
, null
if passed improper args
recalculate_offsets
Internal use only. Recalculates all offsets for the elements
register_element
Registers a hud element, associated with elem_alias
Returns null
if passed improper args, FALSE
if there was an error, TRUE
otherwise
remove_element
Removes the element with alias elem_alias
Returns: null
if passed bad arguments, TRUE
otherwise
set_elem_position
Used to manually set the position of an element relative to the BOTTOM LEFT corner of a hud zone. no safety checks