Skip to content

Commit

Permalink
fixed event hook naigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-of-codecraft committed Mar 20, 2024
1 parent 88c03cb commit 08797b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/wowapi/classes/HookScripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ In this example:
7. We hook the `handleCombatLogEvent` function to the "OnEvent" event of the `combatLogFrame` using `combatLogFrame.HookScript("OnEvent", handleCombatLogEvent)`.
8. We register the "COMBAT_LOG_EVENT_UNFILTERED" event using `combatLogFrame.RegisterEvent` to receive combat log events.

## OnHide & OnShow & OnLoad
## OnHide
## OnShow
## OnLoad

Hook for handling common events for when a UIObject is shown, hidden, or initially loaded.

Expand Down Expand Up @@ -332,7 +334,8 @@ In this example:

5. In the `handleOnLoad` function, we print a message indicating that the frame is loaded and set its background color to blue. We also register the `"PLAYER_ENTERING_WORLD"` event and set up an event handler using `SetScript`. When the player enters the world, the frame will be shown.

## OnMouseDown & OnMouseUp
## OnMouseDown
## OnMouseUp

Hooks for mouse related events

Expand Down Expand Up @@ -527,7 +530,8 @@ Finally, we create an instance of the `MyAddon` class to initialize the addon.

This example demonstrates how to use the `HookScript` method to register a script handler for the `"OnUpdate"` event and perform frame updates based on the elapsed time.

## OnValueChanged & OnTextChange
## OnValueChanged
## OnTextChange

Handles when a UIObject with a set value or text is updated.

Expand Down

0 comments on commit 08797b9

Please sign in to comment.