Quantcast Scene_manager - ESOUI
Thread Tools Display Modes
08/19/18, 04:05 PM   #1
KLISK
 
KLISK's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2018
Posts: 6
Scene_manager

Tell me how can I get a list of fragments in this format "FRAME_PLAYER_FRAGMENT"?
I need to find all the elements that have ".duration"

Last edited by KLISK : 08/19/18 at 04:12 PM.
  Reply With Quote
08/19/18, 04:13 PM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,768
There is no list afaik and I guess you need to find the appropriate fragments via the game's code by searching it for the text like this:
https://github.com/esoui/esoui/searc...ped_q=FRAGMENT
  Reply With Quote
08/19/18, 04:33 PM   #3
KLISK
 
KLISK's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2018
Posts: 6


Perhaps you can tell me how I can remove the animation from this fragment "LOOT_WINDOW_FRAGMENT"
  Reply With Quote
08/19/18, 04:49 PM   #4
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,768
No, but:
Use the text search I've written above, search for LOOT_WINDOW_FRAGMENT.
You'll find

Lua Code:
  1. function ZO_Loot:UpdateLootWindow(name, actionName, isOwned)
  2.     self:UpdateList()
  3.     self.title:SetText(name)
  4.  
  5.     self.keyButton:SetText(actionName)
  6.     self.keyButton:SetEnabled(false)
  7.     self.keyButton:SetNormalTextColor(self.nonStolenItemsPresent and ZO_NORMAL_TEXT or ZO_ERROR_COLOR)
  8.  
  9.     if self.itemCount == 0 then
  10.         self:Hide()
  11.     elseif self.control:IsControlHidden() then
  12.         if SCENE_MANAGER:IsShowingBaseScene() then
  13.             self.returnScene = nil
  14.             LOOT_WINDOW_FRAGMENT:AnimateNextShow()
  15.         else
  16.             self.returnScene = SCENE_MANAGER:GetCurrentScene():GetName()
  17.         end
  18.  
  19.         SCENE_MANAGER:Show("loot")
  20.     end
  21. end

Guess you could try to use ZO_PreHook for this function and return true so it will not be executed
LOOT_WINDOW_FRAGMENT:AnimateNextShow()

like this:

Lua Code:
  1. ZO_PreHook(LOOT_WINDOW_FRAGMENT,  "AnimateNextShow", function()
  2. --return true to abort the function now WITHOUT calling the original function code of AnimateNextShow
  3. --afterwards
  4. return true
  5. end)

Maybe this helps or breaks all
  Reply With Quote
08/19/18, 05:04 PM   #5
KLISK
 
KLISK's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2018
Posts: 6
Originally Posted by Baertram View Post
Lua Code:
  1. ZO_PreHook(LOOT_WINDOW_FRAGMENT,  "AnimateNextShow", function()
  2. --return true to abort the function now WITHOUT calling the original function code of AnimateNextShow
  3. --afterwards
  4. return true
  5. end)
Maybe this helps or breaks all
It works, you are a magnificent person!
  Reply With Quote
08/19/18, 05:16 PM   #6
KLISK
 
KLISK's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2018
Posts: 6
Originally Posted by Baertram View Post
Lua Code:
  1. ZO_PreHook(LOOT_WINDOW_FRAGMENT,  "AnimateNextShow", function() return true end)
Can I do something like this with "INVENTORY_FRAGMENT" to turn off the animation. Instead of "INVENTORY_FRAGMENT.duration = 0"
  Reply With Quote
08/19/18, 06:00 PM   #7
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,768
I've described you how to search for it above.
Try it yourself., it's more fun then
  Reply With Quote
08/19/18, 06:28 PM   #8
KLISK
 
KLISK's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2018
Posts: 6
Originally Posted by Baertram View Post
I've described you how to search for it above.
Try it yourself., it's more fun then
He refers to this:
Lua Code:
  1. INVENTORY_FRAGMENT = ZO_FadeSceneFragment:New(ZO_PlayerInventory)
Lua Code:
  1. ZO_FadeSceneFragment = ZO_AnimatedSceneFragment:Subclass()
  2.  
  3. function ZO_FadeSceneFragment:New(control, alwaysAnimate, duration)
  4.     return ZO_AnimatedSceneFragment.New(self, "FadeSceneAnimation", control, alwaysAnimate, duration)
  5. end
Not can enter...
-----------
I think duration = 0 disables the feature disappearance at all.
I had a problem that I can't use SetAlpha(<1).
Tell me how ZO_PreHook() may affect performance? He is invoked at each call to the target function?

Last edited by KLISK : 08/20/18 at 03:30 AM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Scene_manager

Thread Tools
Display Modes

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