ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   Event_action_layer_pushed (https://www.esoui.com/forums/showthread.php?t=4804)

Argusus 06/16/15 07:57 AM

Event_action_layer_pushed
 
How do I detect what type of layer was pushed to the UI? Do I use SI_GAMECAMERAACTIONTYPE? I'd like to detect when I approach an npc and have the ability to interact with it.

Baertram 06/16/15 11:56 AM

You can just use the event, create a callback function for that event and do a debug message output d("Active layer index: " .. activeLayerIndex) for the parameters layerIndex and activeLayerIndex.

If activeLayerIndex e.g. is 2 the main menu is shown somehow (inside the pop event).

Maybe there is some special activeLayerIndex for the NPC interaction too then.

But as I can see the answer for your search was given in that other lua/xml thread already.

circonian 06/22/15 12:21 PM

Lua Code:
  1. EVENT_ACTION_LAYER_POPPED (integer eventCode, integer layerIndex, integer activeLayerIndex)
  2. EVENT_ACTION_LAYER_PUSHED (integer eventCode, integer layerIndex, integer activeLayerIndex)

Then there is a lot of API to find out information about it, below is only a few examples (there is more layer API than this), search the wiki API page for "layer" and just go through looking for the API that gives you the info you need.
Lua Code:
  1. GetNumActionLayers()
  2.         Returns: integer actionLayers
  3.  
  4.     GetActionLayerInfo(integer layerIndex)
  5.         Returns: string layerName, integer numLayerCategories
  6.  
  7.     GetActionLayerCategoryInfo(integer layerIndex, integer categoryIndex)
  8.         Returns: string categoryName, integer numActions
  9.  
  10.     GetActionInfo(integer layerIndex, integer categoryIndex, integer actionIndex)
  11.         Returns: string actionName, boolean isRebindable, boolean isHidden


All times are GMT -6. The time now is 06:55 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI