Thread Tools Display Modes
08/06/14, 04:15 PM   #1
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
Ask a simple question, get a simple answer

The purpose of this thread is to ask simple questions about the API and not a How-to tutorial. I have so many questions that often can be resolved with a yes or no, or a link to something that this type of thread may be beneficial to others.

When asking a question preface it with a Q# and answer with an A#.

I have one! ~laughs~

Q1: Is there a way to reverse the fill direction of a <StatusBar> with an attribute from the standard default of left-to-right?

Last edited by unLeashed3k : 08/11/14 at 11:36 PM.
  Reply With Quote
08/06/14, 04:47 PM   #2
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey unLeashed3k,

A1: no, but you can do that like I did in my All Experience Bars addon. The function is called HarvensExperienceBar:SwitchBarTextureAlignment().
  Reply With Quote
08/06/14, 05:07 PM   #3
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
R1: Darn!, was hoping it would be as easy as <StatusBar fill="REVERSE" /> or SetMinMax(-200, 0) then set values going down such as SetValue(-20) for 10% filled on the right side. So with your example, if I got it straight, is to grab the texture coordinates and pull it to the left then reset the anchor of the texture?
  Reply With Quote
08/06/14, 05:22 PM   #4
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
R1: Hmm... I didn't try SetMinMax(-200, 0) with SetValue(-x) - but I don't think it will work since the arrow texture is pointing in the wrong direction. Yes, I switched horizontal texture coordinates to make a mirror texture and then reanchored it with the other end. But all the problems are gone when you use statusbars like in my Research Timers
  Reply With Quote
08/06/14, 05:30 PM   #5
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by unLeashed3k View Post
R1: Darn!, was hoping it would be as easy as <StatusBar fill="REVERSE" /> or SetMinMax(-200, 0) then set values going down such as SetValue(-20) for 10% filled on the right side. So with your example, if I got it straight, is to grab the texture coordinates and pull it to the left then reset the anchor of the texture?
If you want to do it in XML, try barAlignment="REVERSE":
xml Code:
  1. <StatusBar name="MyBar" inherits="ZO_PlayerAttributeStatusBar" barAlignment="REVERSE" />
  Reply With Quote
08/06/14, 05:40 PM   #6
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
R1(Garkin): Works! I was using barAlignment="BAR_ALIGNMENT_REVERSE" because the WikiDocumentation told me so! Last time I listen to the Wiki! =)
  Reply With Quote
08/07/14, 04:11 AM   #7
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
I was sure it will not work because that's the case with ZO_ArrowStatusBarWithBG. But looks like ZO_PlayerAttributeStatusBar is completly different... sorry for misleading you
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Ask a simple question, get a simple answer


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