Thread Tools Display Modes
04/02/14, 09:24 AM   #1
vapakule
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
Question Event for Framing screen state.

Im looking for event handler that returns framing screen state. For example, i need listen event when map or journal is opened.
  Reply With Quote
04/02/14, 09:31 AM   #2
Errc
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 30
Check out action layers.
  Reply With Quote
04/02/14, 02:44 PM   #3
vapakule
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
Originally Posted by Errc View Post
Check out action layers.
Thanks for answer.
Ye, so there two of them, for action bar pushed and action bar popped. But i need actually listen next kind of events :
-- FRAMING_SCREEN_AVA
-- FRAMING_SCREEN_DEFAULT
-- FRAMING_SCREEN_INVENTORY
-- FRAMING_SCREEN_JOURNAL
-- FRAMING_SCREEN_LOOT
-- FRAMING_SCREEN_MAP
-- FRAMING_SCREEN_SKILLS
-- FRAMING_SCREEN_SOCIAL
-- FRAMING_SCREEN_SYSTEM

Basically i want change key binding set, which will be depends on the frame condition. It would be nice if someone showed me possible implementation of @frame state switch. Thanks
  Reply With Quote
04/04/14, 02:55 AM   #4
vapakule
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
anyone?
  Reply With Quote
04/04/14, 07:31 AM   #5
Cr4x
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 11
As Errc said you can watch EVENT_ACTION_LAYERS_POPPED and _PUSHED for just watching if something is opened.

If you need to access further informations for example when the Inventory is opened:

Lua Code:
  1. MyAddon = {}
  2. MyAddon.InventoryOpened = false
  3.  
  4. function MyAddon.ZOPlayerInventoryOnShow(self, hidden)
  5.     if ( not hidden ) then
  6.         MyAddon.InventoryOpened = true
  7.     end
  8. end
  9.  
  10. function MyAddon.ZOPlayerInventoryOnHide(self, hidden)
  11.     if ( hidden ) then
  12.         MyAddon.InventoryOpened = false
  13.     end
  14. end
  15.  
  16. function MyAddon.OnAddOnLoaded(eventcode, addOnName)
  17.     if (addOnName ~= "MyAddon") then return end
  18.  
  19.     -- ZO_PlayerInventory < ToplevelControl which is shown when pressing "i"
  20.     ZO_PlayerInventory:SetHandler("OnShow", MyAddon.ZOPlayerInventoryOnShow)
  21.     ZO_PlayerInventory:SetHandler("OnShow", MyAddon.ZOPlayerInventoryOnHide)
  22. end
  23.  
  24. EVENT_MANAGER:RegisterForEvent("MyAddon_EVENT_ADD_ON_LOADED", EVENT_ADD_ON_LOADED, MyAddon.OnAddOnLoaded)

Last edited by Cr4x : 04/04/14 at 07:34 AM. Reason: [Indent] not working inside of lua highlight
  Reply With Quote
04/04/14, 05:59 PM   #6
vapakule
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 15
Thumbs up

Thanks Cr4x, i will try it and back soon with tons of questions )

UPD: its WORKING!

Last edited by vapakule : 04/04/14 at 07:18 PM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Event for Framing screen state.


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