File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,18 @@ export const modules = [
3030
3131` Referee.java `
3232``` java
33- // adding a tooltip to an entity
34- tooltip. setTooltipText(myEntity, " the tooltip text linked to this entity" );
33+ @Inject TooltipModule tooltips;
3534
36- // removing the tooltip from an other entity
37- tooltip. removeTooltipText(otherEntity);
35+ @Override
36+ public void init() {
37+ // adding a tooltip to an entity
38+ tooltips. setTooltipText(myEntity, " the tooltip text linked to this entity" );
3839
39- // getting the tooltip text associated to an entity
40- String text = tooltip. getTooltipText(myEntity);
41- // in this case text will now be "the tooltip text linked to this entity"
42- ```
40+ // removing the tooltip from an other entity
41+ tooltips. removeTooltipText(otherEntity);
42+
43+ // getting the tooltip text associated to an entity
44+ String text = tooltips. getTooltipText(myEntity);
45+ // in this case text will now be "the tooltip text linked to this entity"
46+ }
47+ ```
You can’t perform that action at this time.
0 commit comments