Thread Tools Display Modes
07/26/15, 08:36 PM   #1
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Need help understanding why these texture are not filling the background...

I have a ZO_ScrollList template for a row that includes a backdrop. I do not understand why the backdrop is drawing the way that it is... The highlight backdrop is not even doing the same thing as the default backdrop...

I really want this looking like the default UI backpack inventroy except wider... I'm using the same background textures as the inventory based on what /zgoo showed me. I have been trying stuff to get it working but no luck so far...

Anyone know what I need to do? Thanks.


What it looks like:


Using ControlOutline addon ( with a slight mod ):


Here is my row template xml:
Code:
<GuiXml>
  <Controls>
    <Control name="MailLooterLootListRow" virtual="true">
      <Dimensions x="750" y="52" />

      <Controls>
        <Texture name="$(parent)_BG" textureFile="/esoui/art/miscellaneous/listitem_backdrop.dds" layer="BACKGROUND" alpha="1" pixelRoundingEnabled="true" >
          <AnchorFill />
        </Texture>

        <Texture name="$(parent)_Highlight" textureFile="/esoui/art/miscellaneous/listitem_highlight.dds" layer="BACKGROUND" alpha="1" hidden="true">
          <AnchorFill />
        </Texture>

        <Texture name="$(parent)_Type" alpha="0.7">
          <Dimensions x="40" y="40" />
          <Anchor point="TOPLEFT" relativeTo="$(parent)" offsetX="10" offsetY="5" />
        </Texture>

        <Texture name="$(parent)_Icon">
          <Dimensions x="40" y="40" />
          <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$(parent)_Type" offsetX="42" offsetY="0" />
        </Texture>

        <Label name="$(parent)_Name" font="ZoFontGameBold" text="" wrapMode="ELLIPSIS">
          <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$(parent)_Icon" offsetX="27" offsetY="0" />
        </Label>

        <Label name="$(parent)_Value" font="ZoFontGameBold" text="">
          <Anchor point="RIGHT" relativePoint="RIGHT" relativeTo="$(parent)" offsetX="-10" offsetY="0" />
        </Label>
      </Controls>

    </Control>

  </Controls>
</GuiXml>
  Reply With Quote
07/27/15, 01:07 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
I trapped into this, too.

Code:
        <Texture name="Highlight" textureFile="EsoUI/Art/Miscellaneous/listItem_highlight.dds" alpha="0" level="1" virtual="true">
            <AnchorFill />
            <TextureCoords left="0" right="1" top="0" bottom=".625" />
        </Texture>
You can take a look to LibAddonMenu-2.0.lua, too:
Search for:
ZO_ScrollList_EnableSelection(addonList, "ZO_ThinListHighlight", addonListRow_Select)
  Reply With Quote
07/27/15, 12:12 PM   #3
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Originally Posted by votan View Post
I trapped into this, too.

Code:
        <Texture name="Highlight" textureFile="EsoUI/Art/Miscellaneous/listItem_highlight.dds" alpha="0" level="1" virtual="true">
            <AnchorFill />
            <TextureCoords left="0" right="1" top="0" bottom=".625" />
        </Texture>
Do you know what the TextureCoords numbers mean? Are they ranged 0 to 1?
  Reply With Quote
07/27/15, 12:41 PM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Lodur View Post
Do you know what the TextureCoords numbers mean? Are they ranged 0 to 1?
No really. I think they are percentage from -1 to 1.
  Reply With Quote
07/27/15, 12:42 PM   #5
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Votan - That TextureCoords is working... I just have no idea why bottom=".625" helps????
  Reply With Quote
07/27/15, 12:51 PM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Lodur View Post
Votan - That TextureCoords is working... I just have no idea why bottom=".625" helps????
I guess, AnchorFill aligns the control, but TextureCoords aligns the texture to 62.5% of "bottom" == height of control. But I just guess.
  Reply With Quote
07/27/15, 01:14 PM   #7
Wandamey
Guest
Posts: n/a
guys, really...



(thanks circonian, glad he can get a mod out by the time i only got the idea of how to do it )
  Reply With Quote
07/27/15, 01:30 PM   #8
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Wandamey View Post


(thanks circonian, glad he can get a mod out by the time i only got the idea of how to do it )
Aaahhh, yes. Wandamey got it.
  Reply With Quote
07/27/15, 02:58 PM   #9
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
This may not be what you want, maybe you have other plans for the highlight, but instead of creating it in your row template you can just pass a highlight template to ZO_ScrollList_EnableSelection(...)
and pick a different highlight texture:
Lua Code:
  1. local selectTemplate = "ZO_ThinListHighlight"
  2. ZO_ScrollList_EnableSelection(scrollList, selectTemplate, selectCallback)
ZO_ThinListHighlight (You probably wont see the black on the right hand side your rows aren't that wide)


If you don't need a callback & just want a highlight you can just leave the selectCallback nil & it will just highlight/unhighlight the rows for you when they are clicked.

Last edited by circonian : 07/27/15 at 03:00 PM.
  Reply With Quote
07/27/15, 03:05 PM   #10
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Lodur View Post
Using ControlOutline addon ( with a slight mod ):
I originally had it alternate colors from parent to child for the outlines, but when I tried it on the backpack it was to hard to tell which controls were children of which parent controls. It looks pretty nice on that layout though. Maybe I'll put it back in as an option.
  Reply With Quote
07/27/15, 04:11 PM   #11
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by votan View Post
I guess, AnchorFill aligns the control, but TextureCoords aligns the texture to 62.5% of "bottom" == height of control. But I just guess.
You're right, texture coordinates are numbers between 0 and 1 from the left to the right and from the top to the bottom.

It is used for example if you have set of icons on the same texture - something like this:


If your control should show just the green part of the texture, you will use coordinates:
XML Code:
  1. <TextureCoords left="0" right="0.5" top="0" bottom="0.5" />
If you want to show yellow part, use:
XML Code:
  1. <TextureCoords left="0.5" right="1" top="0.5" bottom="1" />
  Reply With Quote
07/28/15, 05:54 AM   #12
Wandamey
Guest
Posts: n/a
I just rechecked in my inventory to find out why there is 37.5% transparent on the highlight : the texture is centered vertically and looks thinner than the icon. (edit eeerff only because when the icon looks bigger when mouseovered...)

so if you want exactly the same look, just find a way to vertical-center it.(edit : don't mind me i'm just typing out loud) (like maybe just 18.75% toward the bottom,idk). but still it doesn't explain why they would leave this 37% transparent, there must be an easier way... (edit : i don't take that back)

now edit with the picture, what i said was totally stupid. i should have known, my coffee is still in the mug

rerere edit : something to do with this? SetAutoAdjustWrappedCoords()... no idea... but anyway the result of whatever the method is is that bottom coord of 0.625


Last edited by Wandamey : 07/28/15 at 06:39 AM.
  Reply With Quote
07/28/15, 12:10 PM   #13
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Thanks for all the help!!!

Thanks everyone.

Got it looking good now. Even got the icon scaling animation in. I stop using ZO_ScrollList for the highlighting and did it manually. This is the same way that the default inventory does in inventory.lua and inventoryslot.lua. I was able to then reuse the existing virtual animation templates.

  Reply With Quote
09/16/15, 09:16 AM   #14
CaptainBlagbird
 
CaptainBlagbird's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 53
How can I show the texture borders like Wandamey and circonian did? Is it a feature of TextureIt, another add-on or something else?
  Reply With Quote
09/16/15, 11:09 AM   #15
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by CaptainBlagbird View Post
How can I show the texture borders like Wandamey and circonian did? Is it a feature of TextureIt, another add-on or something else?
You mean this one: Control Outlines
  Reply With Quote
09/16/15, 11:33 AM   #16
CaptainBlagbird
 
CaptainBlagbird's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 53
Originally Posted by votan View Post
You mean this one: Control Outlines
Yes, thank you!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Need help understanding why these texture are not filling the background...


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