SocketSlotUI ​
Inherits: MarginContainer
Individual socket slot display - supports both tooltip and interactive socket panel modes Tooltips disappear on hover anyway, so all functionality is always enabled Refactored to use system_hub instead of ui_manager
Properties ​
Texture2D | socketable_texture | |
String | socketable_effect_text | "<Empty>" |
Variables ​
ItemInstance.SocketInstance | socket_instance | null |
int | socket_index | -1 |
Color | socket_colour | Color.GRAY |
Color | hover_background_color | Color(0.5, 0.5, 0.5, 1.0) |
Color | can_accept_color | Color(0.2, 0.6, 0.2, 1.0) |
Color | cannot_accept_color | Color(0.6, 0.2, 0.2, 1.0) |
GameHost.SystemHub | system_hub |
Methods ​
void | setup_socket( socket_inst: ItemInstance.SocketInstance, p_system_hub: GameHost.SystemHub = null, index: int = -1 ) |
void | setup_socket_definition( socket_def: SocketDefinition, index: int = -1 ) |
String | strip_bbcode( text: String ) |
bool | can_accept_socketable_item( item: ItemInstance ) |
bool | try_socket_item( item: ItemInstance ) |
void | refresh_display() |
Signals ​
socket_item_removed( socket_index: int, removed_item: ItemInstance ) ​
========== SIGNALS ==========
socket_item_added( socket_index: int, added_item: ItemInstance ) ​
Emitted when a gem or rune is put in the socket.
socket_hovered( socket_slot: SocketSlotUI, is_hovering: bool ) ​
Emitted when the mouse enters or leaves the socket.
Property descriptions ​
Texture2D socketable_texture ​
========== EXPORT PROPERTIES (for tooltip compatibility) ==========
String socketable_effect_text = "<Empty>" ​
Effect description or placeholder
Variable descriptions ​
ItemInstance.SocketInstance socket_instance = null ​
========== PROPERTIES ==========
int socket_index = -1 ​
Index in the equipment's socket array
Color socket_colour = Color.GRAY ​
Socket border/background color
Color hover_background_color = Color(0.5, 0.5, 0.5, 1.0) ​
========== VISUAL STATES ==========
Color can_accept_color = Color(0.2, 0.6, 0.2, 1.0) ​
The color of the socket when the item dragged fits.
Color cannot_accept_color = Color(0.6, 0.2, 0.2, 1.0) ​
The color of the socket when the item dragged does not fit.
GameHost.SystemHub system_hub ​
System Ref
Method descriptions ​
void setup_socket( socket_inst: ItemInstance.SocketInstance, p_system_hub: GameHost.SystemHub = null, index: int = -1 ) ​
Setup socket with socket instance data (updated to use system_hub)
void setup_socket_definition( socket_def: SocketDefinition, index: int = -1 ) ​
Setup socket for definition-only display (for vendor tooltips)
String strip_bbcode( text: String ) ​
The text without its BBCode tags.
bool can_accept_socketable_item( item: ItemInstance ) ​
Does the item fit this socket?
bool try_socket_item( item: ItemInstance ) ​
Puts the item in the socket. False when it does not fit.
void refresh_display() ​
Update display manually (useful for dynamic updates)