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 class
Component that handles tooltip detection and triggering.static class
UI component for rendering tooltips in the bottom-left corner of the screen.static class
Global manager for coordinating between TooltipComponent and TooltipDisplay.static enum
Visual styles for tooltips using existing UI skin colorsstatic class
Component for invisible trigger zone entities that handle tooltip detection -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TooltipSystem
public TooltipSystem()
-