Skip to content

Commit

Permalink
Update ui_button_events.md
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Earnshaw <nearnshaw@decentraland.org>
  • Loading branch information
nearnshaw authored Jan 9, 2025
1 parent 9e8af02 commit 531367c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/creator/sdk7/2d-ui/ui_button_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ ReactEcsRenderer.setUiRenderer(() => (

Note that in the example above, the color depends on a `buttonEnabled` variable. Whenever this variable's value changes, it inmediately affects the background color.

## Tooltips
## Hover Feedback

Another common use case is to display tooltips when hovering over a button, to clarify what this button does. Use the `onMouseEnter` and `onMouseLeave` callbacks to display and hide these tooltips on your UI.
Another common use case is to display some kind of visual hint when hovering over a button, to clarify that this is interactible, or even to display a hover hint explaining what this button does. Use the `onMouseEnter` and `onMouseLeave` callbacks to detect when the player's cursor is on the button, and react accordingly.

```ts
import { ReactEcsRenderer } from '@dcl/sdk/react-ecs'
Expand Down

0 comments on commit 531367c

Please sign in to comment.