Thread Tools Display Modes
04/05/14, 04:33 AM   #1
LoPony
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 10
Overwrite event-handlers of default UI Elements

Hi,

I was trying to call a custom method if the gamemenu is shown:
Code:
ZO_GameMenu_InGame:SetHandler( 'OnShow', function() doSomething() end )
But this will disable the GameMenu from beeing displayed at all

Is there any possibility to do something like?
Code:
ZO_GameMenu_InGame:SetHandler( 'OnShow', function() DoWhatItisSupposedToDo() doSomething() end )
Maybe I have to add a second OnShow-handler or something?

Greetings
  Reply With Quote
04/05/14, 05:36 AM   #2
chase
Join Date: Apr 2014
Posts: 3
Try this:

Lua Code:
  1. local original = ZO_GameMenu_InGame:GetHandler("OnShow")
  2. ZO_GameMenu_InGame:SetHandler ( "OnShow" , function(...)
  3.     d("menus")
  4.     original(...)
  5. end)
  Reply With Quote
04/05/14, 06:08 AM   #3
LoPony
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 10
thanks chase, works pretty good
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Overwrite event-handlers of default UI Elements


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off