Thread Tools Display Modes
09/29/18, 05:25 AM   #1
Eldrni
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 7
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?
  Reply With Quote
09/29/18, 06:35 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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.

Last edited by Baertram : 09/29/18 at 06:40 AM.
  Reply With Quote
09/29/18, 06:51 AM   #3
Eldrni
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 7
Originally Posted by Baertram View Post
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)?

Last edited by Eldrni : 09/29/18 at 07:04 AM.
  Reply With Quote
09/29/18, 07:43 AM   #4
Eldrni
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 7
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.
  Reply With Quote
09/29/18, 11:10 AM   #5
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
ZO_HUDInfamyMeter?
  Reply With Quote
09/29/18, 11:25 AM   #6
Eldrni
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 7
Originally Posted by Rhyono View Post
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.
  Reply With Quote
09/29/18, 11:39 AM   #7
Eldrni
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 7
Originally Posted by Eldrni View Post
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!
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Need help moving bounty panel

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