Class TooltipSystem
java.lang.Object
com.csse3200.game.components.tooltip.TooltipSystem
Complete tooltip system for displaying contextual information when players approach entities.
This system provides:
- TooltipStyle: Visual styles (DEFAULT, SUCCESS, WARNING)
- TooltipComponent: Detection component for entities that need tooltips
- TooltipDisplay: UI rendering component for showing tooltips
- TooltipManager: Global coordination between components
Usage:
1. Add TooltipDisplay to your game area's UI entity
2. Add TooltipComponent to any entity that needs a tooltip
Example:
// In game area UI setup:
ui.addComponent(new TooltipSystem.TooltipDisplay());
// On any entity:
entity.addComponent(new TooltipSystem.TooltipComponent("Press E to interact"));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classComponent that handles tooltip detection and triggering.static classUI component for rendering tooltips in the bottom-left corner of the screen.static classGlobal manager for coordinating between TooltipComponent and TooltipDisplay.static enumVisual styles for tooltips using existing UI skin colorsstatic classComponent for invisible trigger zone entities that handle tooltip detection -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TooltipSystem
public TooltipSystem()
-