TooltipItem ​
Inherits: TooltipBase < MarginContainer
Comprehensive tooltip for all item types with vendor context support Now supports both ItemInstance (full detail) and ItemDefinition (basic) display
Properties ​
PackedScene | socket_slot_scene |
Variables ​
ItemInstance | current_item_instance | null |
ItemDefinition | current_item_definition | null |
Dictionary | vendor_context | {} |
String | tooltip_context | "inventory" # "inventory", "vendor_buying", "vendor_sell... |
Methods ​
void | set_systems_refs( system_hub: GameHost.SystemHub ) |
void | setup_tooltip( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) |
String | strip_bbcode( text: String ) |
void | show_definition_tooltip( item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) |
void | update_vendor_pricing( vendor_data: Dictionary ) |
bool | has_vendor_context() |
ItemInstance | get_current_item_instance() |
ItemDefinition | get_current_item_definition() |
String | get_tooltip_context() |
void | update_context( new_context: String, vendor_data: Dictionary = {} ) |
bool | is_showing_instance_data() |
void | set_item( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) |
Property descriptions ​
PackedScene socket_slot_scene ​
Preloaded scene for socket slots
Variable descriptions ​
ItemInstance current_item_instance = null ​
The item the tooltip shows (full detail).
ItemDefinition current_item_definition = null ​
The item definition the tooltip shows (basic detail).
Dictionary vendor_context = ​
For vendor-specific pricing info
String tooltip_context = "inventory" # "inventory", "vendor_buying", "vendor_selling ​
Where the item is (inventory, vendor ...), which changes what the tooltip shows.
Method descriptions ​
void set_systems_refs( system_hub: GameHost.SystemHub ) ​
Gives the tooltip the hub of the game systems and applies the label settings.
void setup_tooltip( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) ​
Setup tooltip with item data and context - supports both instance and definition
String strip_bbcode( text: String ) ​
The text without its BBCode tags.
void show_definition_tooltip( item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) ​
Show tooltip for definition only (basic display)
void update_vendor_pricing( vendor_data: Dictionary ) ​
Update vendor pricing without changing item
bool has_vendor_context() ​
Check if tooltip is showing vendor information
ItemInstance get_current_item_instance() ​
Get current item instance being displayed
ItemDefinition get_current_item_definition() ​
Get current item definition being displayed
String get_tooltip_context() ​
Get current tooltip context
void update_context( new_context: String, vendor_data: Dictionary = {} ) ​
Update context without recreating tooltip
bool is_showing_instance_data() ​
Check if tooltip is showing instance-specific data
void set_item( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) ​
Convenience method for setting item with context (matches other tooltip patterns)