ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Scene_manager (https://www.esoui.com/forums/showthread.php?t=8006)

KLISK 08/19/18 04:05 PM

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"

Baertram 08/19/18 04:13 PM

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

KLISK 08/19/18 04:33 PM



Perhaps you can tell me how I can remove the animation from this fragment "LOOT_WINDOW_FRAGMENT"

Baertram 08/19/18 04:49 PM

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 :D

KLISK 08/19/18 05:04 PM

Quote:

Originally Posted by Baertram (Post 35703)
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 :D

It works, you are a magnificent person!

KLISK 08/19/18 05:16 PM

Quote:

Originally Posted by Baertram (Post 35703)
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"

Baertram 08/19/18 06:00 PM

I've described you how to search for it above.
Try it yourself., it's more fun then :p

KLISK 08/19/18 06:28 PM

Quote:

Originally Posted by Baertram (Post 35712)
I've described you how to search for it above.
Try it yourself., it's more fun then :p

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?


All times are GMT -6. The time now is 01:54 PM.

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