/tg/ Station 13 - Modules - Types

code/__HELPERS/screen_objs.dm

/proc/screen_loc_to_offset Takes a screen loc string in the format "+-left-offset:+-pixel,+-bottom-offset:+-pixel" Where the :pixel is optional, and returns A list in the format (x_offset, y_offset) We require context to get info out of screen locs that contain relative info, so NORTH, SOUTH, etc
/proc/offset_to_screen_loc Takes a list in the form (x_offset, y_offset) And converts it to a screen loc string Accepts an optional view string/size to force the screen_loc around, so it can't go out of scope
/proc/get_valid_screen_location Returns a valid location to place a screen object without overflowing the viewport
/proc/cut_relative_direction Takes a screen_loc string and cut out any directions like NORTH or SOUTH