/datum/tooltips 
Vars | |
clickTips | All the tooltips opened by clicking on targets. Should contain only visible tooltips |
---|---|
debug | Whether tooltip debugging enabled |
hoverTip | The tooltip used for hovering over a target (we assume clients can only hover over one thing at a time) |
html | The tooltip HTML, for caching |
mapControl | The control ID of the map |
mapId | The window ID that contains the map |
owner | The client |
preloadedClickTip | A preloaded tooltip to use for the next shown pinned tooltip |
windowPrefix | All created tooltip window IDs will have this prefix |
Procs | |
canShowHover | Determine if we're allowed to show hover tooltips to a client |
clearAll | Special method to remove all tooltip windows Used on client login to clean up any tooltips that might have been stuck open from a previous round |
findClickTip | Find a tooltip that was opened by clicking on a specific target |
hide | Hide a tooltip |
hideAll | Hide all tooltips of any type |
hideAllClickTips | Hide all tooltips that were opened by clicking on any target |
hideOnTarget | Hide any type of tooltip opened on a specific target |
loadAssets | Send browser assets to the client |
onMove | Called on mob move |
onResize | Called on window resize |
onTooltipRemoved | Called when a tooltip is deleted. Do not call manually. |
preload | Preload a tooltip by creating it ahead of time whilst remaining invisible Intended to speed up initial show times |
reset | Move all visible tooltips Experimental and incomplete, do not use Escape hatch to completely reset in case of a broken state |
show | Show a tooltip |
Var Details
clickTips 
All the tooltips opened by clicking on targets. Should contain only visible tooltips
debug 
Whether tooltip debugging enabled
hoverTip 
The tooltip used for hovering over a target (we assume clients can only hover over one thing at a time)
html 
The tooltip HTML, for caching
mapControl 
The control ID of the map
mapId 
The window ID that contains the map
owner 
The client
preloadedClickTip 
A preloaded tooltip to use for the next shown pinned tooltip
windowPrefix 
All created tooltip window IDs will have this prefix
Proc Details
canShowHover
Determine if we're allowed to show hover tooltips to a client
clearAll
Special method to remove all tooltip windows Used on client login to clean up any tooltips that might have been stuck open from a previous round
findClickTip
Find a tooltip that was opened by clicking on a specific target
hide
Hide a tooltip
Arguments:
- type (int) - Type of tooltip to hide. One of
TOOLTIP_HOVER
orTOOLTIP_PINNED
- target (atom) - The target of the tooltip (only required if hiding a pinned tooltip)
hideAll
Hide all tooltips of any type
hideAllClickTips
Hide all tooltips that were opened by clicking on any target
hideOnTarget
Hide any type of tooltip opened on a specific target
loadAssets
Send browser assets to the client
onMove
Called on mob move
onResize
Called on window resize
onTooltipRemoved
Called when a tooltip is deleted. Do not call manually.
preload
Preload a tooltip by creating it ahead of time whilst remaining invisible Intended to speed up initial show times
reset
Move all visible tooltips Experimental and incomplete, do not use Escape hatch to completely reset in case of a broken state
show
Show a tooltip
Arguments:
- type (int) - Type of tooltip to show. One of
TOOLTIP_HOVER
orTOOLTIP_PINNED
- target (atom) - The target of the tooltip
- mouse (string) - Provided from MouseEntered (and similar) procs
- title (string) - The text to display as a title
- content (string) - The main content body to display
- theme (string) - What theme to apply. See
tooltip.css
for available themes - align (list) - Bitmask representing alignment. See
_std\defines\tooltips.dm
for available flags. Multiple flags can be combined, e.g.TOOLTIP_TOP | TOOLTIP_CENTER
- size (list) - Width and height respectively, e.g.
list(200, 300)
Use0
for either to use the automatic size for that axis - offset (list) - X and Y pixels respectively, e.g.
list(10, 20)
- bounds (list) - Width and height respectively, e.g.
list(200, 300)
- extra (list) - Any random extra stuff