ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Need help understanding why these texture are not filling the background... (https://www.esoui.com/forums/showthread.php?t=4930)

Lodur 07/26/15 08:36 PM

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>


votan 07/27/15 01:07 AM

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)

Lodur 07/27/15 12:12 PM

Quote:

Originally Posted by votan (Post 22263)
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?

votan 07/27/15 12:41 PM

Quote:

Originally Posted by Lodur (Post 22272)
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.

Lodur 07/27/15 12:42 PM

Votan - That TextureCoords is working... I just have no idea why bottom=".625" helps????

votan 07/27/15 12:51 PM

Quote:

Originally Posted by Lodur (Post 22276)
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.

Wandamey 07/27/15 01:14 PM

guys, really...
 


(thanks circonian, glad he can get a mod out by the time i only got the idea of how to do it :D)

votan 07/27/15 01:30 PM

Quote:

Originally Posted by Wandamey (Post 22279)


(thanks circonian, glad he can get a mod out by the time i only got the idea of how to do it :D)

Aaahhh, yes. Wandamey got it.

circonian 07/27/15 02:58 PM

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.

circonian 07/27/15 03:05 PM

Quote:

Originally Posted by Lodur (Post 22261)
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.

Garkin 07/27/15 04:11 PM

Quote:

Originally Posted by votan (Post 22278)
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" />

Wandamey 07/28/15 05:54 AM

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


Lodur 07/28/15 12:10 PM

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.


CaptainBlagbird 09/16/15 09:16 AM

How can I show the texture borders like Wandamey and circonian did? Is it a feature of TextureIt, another add-on or something else?

votan 09/16/15 11:09 AM

Quote:

Originally Posted by CaptainBlagbird (Post 23597)
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

CaptainBlagbird 09/16/15 11:33 AM

Quote:

Originally Posted by votan (Post 23598)
You mean this one: Control Outlines

Yes, thank you!


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

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