Class TooltipModule
java.lang.Object
com.codingame.gameengine.module.tooltip.TooltipModule
- All Implemented Interfaces:
Module
The TooltipModule takes care of displaying tooltips under the mouse cursor when an element has a linked tooltip text.
-
Method Summary
Modifier and TypeMethodDescriptiongetTooltipText(Entity<?> entity) voidvoidvoidvoidremoveTooltipText(Entity<?> entity) Removes the tooltip text linked to the entityvoidsetTooltipText(Entity<?> entity, String text) Sets a tooltip text linked to an entity
-
Method Details
-
onGameInit
public void onGameInit()- Specified by:
onGameInitin interfaceModule
-
onAfterGameTurn
public void onAfterGameTurn()- Specified by:
onAfterGameTurnin interfaceModule
-
onAfterOnEnd
public void onAfterOnEnd()- Specified by:
onAfterOnEndin interfaceModule
-
setTooltipText
Sets a tooltip text linked to an entity- Parameters:
entity- theEntityto link the tooltip totext- is the tooltip text that will be displayed when hovering over the entity
-
getTooltipText
- Parameters:
entity- theEntityto get the associated tooltip text from- Returns:
- the tooltip text linked to the entity
-
removeTooltipText
Removes the tooltip text linked to the entity- Parameters:
entity- theEntityto remove a tooltip from
-