ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Need help moving bounty panel (https://www.esoui.com/forums/showthread.php?t=8087)

Eldrni 09/29/18 05:25 AM

Need help moving bounty panel
 
Hi everyone,

I am working on an addon called The Elder Bar.

http://www.esoui.com/downloads/info2...eElderBar.html

I've gotten pretty far with it and released a few versions, but I've reached a point where I am stuck. I have an option that allowes the bar to be located at bottom of the screen and if it's at the bottom, there is an option to bump up the action, health, magicka, and stamina (and all the other associated bars) bars up to make room for it. This is all fine and dandy.

However, the bounty/infamy indicator is in the way and I can't figure out what it's called in order to move it.



Looking at the source code, I thought it was ZO_BountyPanel, but I can't get the coordinates of it in Lua with ZO_BountyPanel:GetTop() or anything like that.

Does anyone know what the proper object is for this?

Baertram 09/29/18 06:35 AM

Check the esoui source code on github and search for the zo_bounty... :New function. There the object will be created. Most of the time is defined in a xml file and called something like BOUNTY_KEYBOARD or BOUNTY_PANEL etc.
The creation is located sometimes in the lua file esoui/ingame/bounty...lua,somewhere at the bottom.

https://github.com/esoui/esoui/blob/...ntydisplay.lua

Seems to inherit from the zo_stats_display. Check the same folder's subfolder keyboard and the lua/xml files in there.

Eldrni 09/29/18 06:51 AM

Quote:

Originally Posted by Baertram (Post 36188)
Check the esoui source code on github and search for the zo_bounty... :New function. There the object will be created. Most of the time is defined in a xml file and called something like BOUNTY_KEYBOARD or BOUNTY_PANEL etc.
The creation is located sometimes in the lua file esoui/ingame/bounty...lua,somewhere at the bottom.

https://github.com/esoui/esoui/blob/...ntydisplay.lua

Seems to inherit from the zo_stats_display. Check the same folder's subfolder keyboard and the lua/xml files in there.

Hi Baertram,

Thanks for the info. The file you mention is how I found ZO_BountyPanel. However I’m not able to successfully unanchor and move it. Every time I try to do something like ZO_BountyPanel:GetTop() in order to record its original position i get an error about trying to access a nil object. I’m not great at reading the source code yet, but is it possible that this object doesn’t exist until it’s needed (ie. commit a crime)?

Eldrni 09/29/18 07:43 AM

Code:

function ZO_Stats_BountyDisplay_Initialize(control)
    STATS_BOUNTY_DISPLAY = ZO_BountyDisplay:New(control, false)
end

Not sure where I got ZO_BountyPanel. Not sure if I typoed the name when I posted this or in my addon. I’ll check it out when I get home later today. Thanks again.

Rhyono 09/29/18 11:10 AM

ZO_HUDInfamyMeter?

Eldrni 09/29/18 11:25 AM

Quote:

Originally Posted by Rhyono (Post 36192)
ZO_HUDInfamyMeter?

Perhaps it is ZO_HUDInfamyMeter. I just arrived home, so I'll look that one up.

My apologies for my original post, I had misspelled the object I was trying to access. It's not ZO_BountyPanel, it is ZO_BountyDisplay, as what's defined in the ESO source code. Be that as it may, my addon still fails whenever I try to do something like this:
Code:

originalBountyTop = ZO_BountyDisplay:GetTop()
I'll see if ZO_HUDInfamyMeter fares any better.

Eldrni 09/29/18 11:39 AM

Quote:

Originally Posted by Eldrni (Post 36194)
Perhaps it is ZO_HUDInfamyMeter. I just arrived home, so I'll look that one up.

My apologies for my original post, I had misspelled the object I was trying to access. It's not ZO_BountyPanel, it is ZO_BountyDisplay, as what's defined in the ESO source code. Be that as it may, my addon still fails whenever I try to do something like this:
Code:

originalBountyTop = ZO_BountyDisplay:GetTop()
I'll see if ZO_HUDInfamyMeter fares any better.

Indeed, ZO_HUDInfamyMeter was the winner. Thanks so much Rhyono!


All times are GMT -6. The time now is 06:22 AM.

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