EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Problem adding InvSlotx to mainhud (https://www.eq2interface.com/forums/showthread.php?t=5199)

manoel 12-18-2005 03:57 AM

Problem adding InvSlotx to mainhud
 
Hey folks

I'm trying to add a row with the 6 inventory bags to my main hud, but not having any luck. I can get the row and 6 icons to show up, but the contents of the slots doesn't show up. I compared to several other custom UI's, but can't figure out what I'm doing wrong. The DynamicData and Name fields are correct.

Anyone have a suggestion of what to check? Is there some trick to making dynamic data appear in a window it wasn't in before?

Thanks

Laffs 12-18-2005 10:00 AM

Make a new page under mainhud and call the file somthing like "eq2ui_mainhud_mywindow.xml"

Then for the actual page name its got to be called "Inventory" for it to work.

Hope that makes sense :)

Agathorn 12-18-2005 10:27 AM

Also bear in mind that this is a semi hardcoded setup on EQ2's part, and while you can get them to display in MainHUD like Laffs has shown, they will not work for any drag and drop operations. If a user tries to drag and drop something in the mainhud inventory the game will CTD.

manoel 12-18-2005 11:24 AM

Do I need to make a separate XML file for the other window to refer to? What I did was add a page to the eq2ui_mainhud_startbutton window so that I'm not creating a new window (I think this is what Agathorn is talking about)

I extended the window size to accomodate the new page then added the content below within the main page. The layout comes out right in UIBuilder and in-game, but the icons just look like clouded squares and don't do anything when I click them.

Code:

<Page AbsorbsInput="false" BackgroundColor="#00FF00" eq2usescomwndcontrols="true" Location="0,48" Name="AutoInventory" PackLocation="fixed,fixed" ScrollExtent="230,37" Size="230,37">
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="165,1" MouseOverColor="#FFFF00" Name="InvSlot5" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="132,1" MouseOverColor="#FFFF00" Name="InvSlot4" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="99,1" MouseOverColor="#FFFF00" Name="InvSlot3" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="66,1" MouseOverColor="#FFFF00" Name="InvSlot2" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="33,1" MouseOverColor="#FFFF00" Name="InvSlot1" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="0,1" MouseOverColor="#FFFF00" Name="InvSlot0" ScrollExtent="30,30" Size="30,30" TreatAsButton="true"/>
</Page>


Laffs 12-18-2005 11:40 AM

They wont work like that sorry to say....

The only way to get it to work is the method I described above.

manoel 12-18-2005 12:57 PM

Ok, made a eq2ui_mainhud_test, used "Inventory" as the name, included it in the eq2ui_mainhud.xml, went in-game and "show_window mainhud.inventory", but the new window still just has the clouded icons.

Here's the contents of the eq2ui_mainhud_test.xml:

Code:

<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" Location="542,0" MaximumSize="286,50" MinimumSize="286,50" Name="Inventory" OnHide="visible=true" OnHoverIn="OnHide=&apos; &apos;" PackLocation="left,top" ScrollExtent="286,50" Size="286,50" UserMovable="true" UserResizable="true">
<Page AbsorbsInput="false" BackgroundColor="#00FF00" eq2usescomwndcontrols="true" Location="0,0" Name="TestPage" PackLocation="fixed,fixed" ScrollExtent="230,46" Size="230,46">
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="220,1" MouseOverColor="#FFFF00" Name="InvSlot5" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="176,1" MouseOverColor="#FFFF00" Name="InvSlot4" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="132,1" MouseOverColor="#FFFF00" Name="InvSlot3" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="88,1" MouseOverColor="#FFFF00" Name="InvSlot2" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="44,1" MouseOverColor="#FFFF00" Name="InvSlot1" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
<Icon BackgroundTint="#000000" DynamicData="/GameData.Items.Inventory" IconStyle="/IconStyles.inventory" Location="0,1" MouseOverColor="#FFFF00" Name="InvSlot0" ScrollExtent="42,42" Size="42,42" TreatAsButton="true"/>
</Page>
</Page>


Laffs 12-18-2005 01:24 PM

The icons also have to be on there respective pages as well for eg

Your weapons icons must be under the page called "Equipment" etc etc just how they are in the true inv

Landiin 12-18-2005 02:44 PM

Quote:

Originally Posted by Laffs
They wont work like that sorry to say....

The only way to get it to work is the method I described above.

Thats not entirly true. If you have two top level nodes It'll work fine. You just can't have your inventory node neested inside another one.

example; eq2ui_mainhud_startbutton.xml
<?xml version="1.0"?>
<Page Name="Inventory" .. >
<Child Nodes/>
</Page>
<Page Name="StartButton" ..>
</Page>

Will work the same as if the Inventory page node was in its own file and you added with include in the eq2ui_mainhud.xml. I do this with my notes in eXtreme so the equi_mainhud.xml file isn't altered thus reducing the chances of the ui breaking with a LU. All EQ2 does is look for 1st generation descendant of the mainhud node and it treats them as windows in the mainhud module.

Laffs 12-18-2005 03:25 PM

I usualy throw in "to my knowlage" lol didnt that time heh :p

Nice bit of info Landiin m8 :)

So it will show the items still that way and the startbutton still works as per usual? with that method you described?

Landiin 12-18-2005 04:08 PM

Quote:

Originally Posted by Laffs
I usualy throw in "to my knowlage" lol didnt that time heh :p

Nice bit of info Landiin m8 :)

So it will show the items still that way and the startbutton still works as per usual? with that method you described?

Correct, EQ will treat the two nodes as their own window. Basically thats all the includes do in eq2ui_mainhud.xml. All the eq2ui_mainhud_*.xml files are children of the MainHud node. It dosn't matter how they are add just as long as they are a 1st generation descendant of the MainHud node.

manoel 12-18-2005 04:46 PM

I'm not sure what I'm missing or doing wrong, still (maybe I just haven't had enough coffee yet :D )

How would my icons be under a different page? Right now I just have the "Inventory" page and the "TestPage" object within that. All the custom UI's I have seen follow basically what I'm using now. The Default UI has "AutoInventory" within "GeneralPage" within "Inventory".

Sorry if this is already explained somewhere, but I haven't been able to find the info yet (obviously) and the UIBuilder docs I know are still in the works.

Laffs 12-18-2005 04:59 PM

Code:

<Page AbsorbsInput="false" eq2usescomwndcontrols="true" Location="7,47" Name="EquipmentPage" PackLocation="fixed,fixed" ScrollExtent="229,33" Size="229,33">
<Icon AbsorbsInput="false" BackgroundTint="#000000" DynamicData="/GameData.Items.Equipment" IconStyle="/IconStyles.inventory" LocalTooltip="Ammo" MouseOverColor="#FFFF00" Name="EqSlot16" Opacity="0.000" ScrollExtent="30,30" Size="30,30" Tooltip="Ammo" TreatAsButton="true"/>
/Page

Myabe that makes it a bit more clear lol .... Sorry I am crap at explaining what I mean :p

Deathbane27 12-19-2005 01:34 AM

Also, needs to be Inventory, not inventory. Case sensitive. Both in the XML and in /show_window

manoel 12-21-2005 12:19 AM

Yep, that was basically my problem. I completely forgot about the case sensitivity. "/show_window mainhud.inventory" brought up the right window, but no content.

I'm wondering if my problem adding it to the MainHUD.StartButton is the same basic issue.

For now I've got it as a separate window which is more than enough. I'll probably play around with the StartButton window a bit more, though, to see if I can figure out why it's broken there.

Thanks for all the help and suggestions :)


All times are GMT -5. The time now is 05:41 PM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI