hud 
Vars | |
| asset_refs_for_reuse | List of weakrefs to objects that we add to our screen that we don't expect to DO anything They typically use * in their render target. They exist solely so we can reuse them, and avoid needing to make changes to all idk 300 consumers if we want to change the appearance |
|---|---|
| atmos_debug_overlays | If this client is being shown atmos debug overlays or not |
| current_plane_offset | Think of multiz as a stack of z levels. Each index in that stack has its own group of plane masters This variable is the plane offset our mob/client is currently "on" We use it to track what we should show/not show Goes from 0 to the max (z level stack size - 1) |
| hand_slots | List of hand slot objects, kept separate from the rest of inventory as mobs can have varying amount of hands |
| hotkey_ui_hidden | This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons) |
| hud_shown | Used for the HUD toggle (F12) |
| hud_version | Current displayed version of the HUD |
| inv_slots | List of all inventory slot screen objects by their slot ID. Some slots are fake and will be missing from here! |
| inventory_shown | Equipped item inventory |
| inventory_slots | List of typepaths of /datum/inventory_slot which will be used to automatically create inventory slot UI elements If assigned a typepath instead of a list, it will instead use all valid subtypes of said typepath Safe to change in initialize_screen_objects() but not later |
| master_groups | Assoc list of key => "plane master groups" This is normally just the main window, but it'll occasionally contain things like spyglasses windows |
| plane_master_controllers | Assoc list of controller groups, associated with key string group name with value of the plane master controller ref |
| screen_groups | List of screen objects by their screen group |
| screen_objects | Assoc list of all screen objects we hold by their key |
| screentip_color | The color to use for the screentips. This is updated by the preference for cheaper reads than would be had with a proc call, especially on one of the hottest procs in the game (MouseEntered). |
| screentip_images | Whether to use text or images for click hints.
Same behavior as screentips_enabled--very hot, updated when the preference is updated. |
| screentip_text | UI for screentips that appear when you mouse over things Stored directly as it is used in very hot MouseEntered code |
| screentips_enabled | Whether or not screentips are enabled. This is updated by the preference for cheaper reads than would be had with a proc call, especially on one of the hottest procs in the game (MouseEntered). |
| ui_style | Subtypes can override this to force a specific UI style |
Procs | |
| add_screen_object | Creates and registers a managed screen object |
| build_action_groups | Generates and fills new action groups with our mob's current actions |
| build_hand_slots | Rebuilds our mob's hand slot screen elements |
| build_plane_groups | Creates the required plane masters to fill out new z layers (because each "level" of multiz gets its own plane master set) |
| check_parallax | Decides if parallax should be rendered or not, and sets things up accordingly |
| create_inventory_slots | Creates inventory slot screen elements based on our assigned inventory_slots |
| generate_landings | Generates visual landings for all groups that the button is not a memeber of |
| get_action_buttons_icons | This is a silly proc used in hud code code to determine what icon and icon state we should be using for hud elements (such as action buttons) that don't have their own icon and icon state set. |
| get_plane_group | Returns the corresponding plane group datum if one exists |
| get_plane_master | Returns the plane master that matches the input plane from the passed in group |
| get_planes_from | Returns all the planes belonging to the passed in group key |
| get_true_plane_masters | Returns a list of all plane masters that match the input true plane, drawn from the passed in group (ignores z layer offsets) |
| get_ui_alert_placement | Gets the placement for the alert based on its index |
| hide_action | Removes the passed in action from its current position on the screen |
| hide_landings | Clears all currently visible landings |
| initialize_screen_objects | Proc for children to spawn their screen object in |
| remove_screen_object | Removes a screen object and refreshes the hud. Can just be passed a key. |
| show_hud | Shows this hud's hud to some mob |
| update_inventory_slots | Updates all of our inventory slots Avoid calling directly in favor of specific update procs |
| update_locked_slots | Handles dimming inventory slots that a mob can't equip items to in their current state |
| view_audit_buttons | Ensures all of our buttons are properly within the bounds of our client's view, moves them if they're not |
Var Details
asset_refs_for_reuse 
List of weakrefs to objects that we add to our screen that we don't expect to DO anything They typically use * in their render target. They exist solely so we can reuse them, and avoid needing to make changes to all idk 300 consumers if we want to change the appearance
atmos_debug_overlays 
If this client is being shown atmos debug overlays or not
current_plane_offset 
Think of multiz as a stack of z levels. Each index in that stack has its own group of plane masters This variable is the plane offset our mob/client is currently "on" We use it to track what we should show/not show Goes from 0 to the max (z level stack size - 1)
hand_slots 
List of hand slot objects, kept separate from the rest of inventory as mobs can have varying amount of hands
hotkey_ui_hidden 
This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
hud_shown 
Used for the HUD toggle (F12)
hud_version 
Current displayed version of the HUD
inv_slots 
List of all inventory slot screen objects by their slot ID. Some slots are fake and will be missing from here!
inventory_shown 
Equipped item inventory
inventory_slots 
List of typepaths of /datum/inventory_slot which will be used to automatically create inventory slot UI elements If assigned a typepath instead of a list, it will instead use all valid subtypes of said typepath Safe to change in initialize_screen_objects() but not later
master_groups 
Assoc list of key => "plane master groups" This is normally just the main window, but it'll occasionally contain things like spyglasses windows
plane_master_controllers 
Assoc list of controller groups, associated with key string group name with value of the plane master controller ref
screen_groups 
List of screen objects by their screen group
screen_objects 
Assoc list of all screen objects we hold by their key
screentip_color 
The color to use for the screentips. This is updated by the preference for cheaper reads than would be had with a proc call, especially on one of the hottest procs in the game (MouseEntered).
screentip_images 
Whether to use text or images for click hints.
Same behavior as screentips_enabled--very hot, updated when the preference is updated.
screentip_text 
UI for screentips that appear when you mouse over things Stored directly as it is used in very hot MouseEntered code
screentips_enabled 
Whether or not screentips are enabled. This is updated by the preference for cheaper reads than would be had with a proc call, especially on one of the hottest procs in the game (MouseEntered).
ui_style 
Subtypes can override this to force a specific UI style
Proc Details
add_screen_object
Creates and registers a managed screen object
build_action_groups
Generates and fills new action groups with our mob's current actions
build_hand_slots
Rebuilds our mob's hand slot screen elements
build_plane_groups
Creates the required plane masters to fill out new z layers (because each "level" of multiz gets its own plane master set)
check_parallax
Decides if parallax should be rendered or not, and sets things up accordingly
create_inventory_slots
Creates inventory slot screen elements based on our assigned inventory_slots
generate_landings
Generates visual landings for all groups that the button is not a memeber of
get_action_buttons_icons
This is a silly proc used in hud code code to determine what icon and icon state we should be using for hud elements (such as action buttons) that don't have their own icon and icon state set.
It returns a list, which is pretty much just a struct of info
get_plane_group
Returns the corresponding plane group datum if one exists
get_plane_master
Returns the plane master that matches the input plane from the passed in group
get_planes_from
Returns all the planes belonging to the passed in group key
get_true_plane_masters
Returns a list of all plane masters that match the input true plane, drawn from the passed in group (ignores z layer offsets)
get_ui_alert_placement
Gets the placement for the alert based on its index
hide_action
Removes the passed in action from its current position on the screen
hide_landings
Clears all currently visible landings
initialize_screen_objects
Proc for children to spawn their screen object in
remove_screen_object
Removes a screen object and refreshes the hud. Can just be passed a key.
show_hud
Shows this hud's hud to some mob
Arguments
- version - denotes which style should be displayed. blank or 0 means "next version"
- viewmob - what mob to show the hud to. Can be this hud's mob, can be another mob, can be null (will use this hud's mob if so)
update_inventory_slots
Updates all of our inventory slots Avoid calling directly in favor of specific update procs
update_locked_slots
Handles dimming inventory slots that a mob can't equip items to in their current state
view_audit_buttons
Ensures all of our buttons are properly within the bounds of our client's view, moves them if they're not