EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 03-17-2010, 10:14 AM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default Need help with Custom hotbar

So my original thread is at here but thats not the technical section i have decieded to make one here.

So I have 2 files one txt and one xml. The txt file is for easy configuration of the hotbar buttons. problem I am running into is using the txt file for the image "SourceResource". I am not sure how to put the value in the txt into the xml by variable. Ive managed to do it with the tooltip and itemvdl. this may not be the most efficient code in the world as its my first UI piece but its working so far. Here is the code I got so far:

UtilBar.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" Location="369,252" Name="UtilBar" ScrollExtent="183,26" Size="183,26" UserMovable="true">

<include>UtilBar_Settings.txt</include>

		<Image Location="2,2" Name="HotKey1Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/manastone.dds" Stretch="true" Style=" "/>
    <Button Location="2,2" Name="HotKey1" OnPress="use_itemvdl=(HK1data) use_itemvdl=(HK1data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK1data=Parent.UtilBarData.HK1.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK1.Tooltip" />

    <Image Location="24,2" Name="HotKey2Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/ub_empty.dds" Stretch="true" Style=" "/>
    <Button Location="24,2" Name="HotKey2" OnPress="use_itemvdl=(HK2data) use_itemvdl=(HK2data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK2data=Parent.UtilBarData.HK2.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK2.Tooltip" />

    <Image Location="46,2" Name="HotKey3Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/shard.dds" Stretch="true" Style=" "/>
    <Button Location="46,2" Name="HotKey3" OnPress="use_itemvdl=(HK3data) use_itemvdl=(HK3data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK3data=Parent.UtilBarData.HK3.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK3.Tooltip" />

    <Image Location="68,2" Name="HotKey4Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/shard.dds" Stretch="true" Style=" "/>
    <Button Location="68,2" Name="HotKey4" OnPress="use_itemvdl=(HK4data) use_itemvdl=(HK4data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK4data=Parent.UtilBarData.HK4.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK4.Tooltip" />

    <Image Location="90,2" Name="HotKey5Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/heart.dds" Stretch="true" Style=" "/>
    <Button Location="90,2" Name="HotKey5" OnPress="use_itemvdl=(HK5data) use_itemvdl=(HK5data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK5data=Parent.UtilBarData.HK5.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK5.Tooltip" />
    
    <Image Location="112,2" Name="HotKey6Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/heart.dds" Stretch="true" Style=" "/>
    <Button Location="112,2" Name="HotKey6" OnPress="use_itemvdl=(HK6data) use_itemvdl=(HK6data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK6data=Parent.UtilBarData.HK6.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK6.Tooltip" />
    	
    <Image Location="134,2" Name="HotKey7Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/signet.dds" Stretch="true" Style=" "/>
    <Button Location="134,2" Name="HotKey7" OnPress="use_itemvdl=(HK7data) use_itemvdl=(HK7data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK7data=Parent.UtilBarData.HK7.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK7.Tooltip" />
    	
    <Image Location="156,2" Name="HotKey8Img" PackSize="a,a" ScrollExtent="20,20" Size="20,20" SourceRect="0,0,32,32" SourceResource="images/signet.dds" Stretch="true" Style=" "/>
    <Button Location="156,2" Name="HotKey8" OnPress="use_itemvdl=(HK8data) use_itemvdl=(HK8data)" PackSize="a,a" ScrollExtent="20,20" Size="20,20" Style=" " OnHoverIn="HK8data=Parent.UtilBarData.HK8.ItemVDL
    	LocalTooltip=Parent.UtilBarData.HK8.Tooltip" />

    <Page AbsorbsInput="false" Location="-1,-1" Name="WindowFrame" PackSize="a,a" ScrollExtent="178,24" Size="178,24" Visible="true">
        <Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="2,2" Name="Frame" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/FrameStyles.single_pixel" ScrollExtent="176,22" Size="176,22" />
        <Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Bkg" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect" ScrollExtent="178,25" Size="178,25" />
    </Page>

</Page>
UtilBar_Settings.txt:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Name="UtilBarData">

	<Page Name="HK1" ItemVDL="111645115" Image="images/ub_empty.dds" Tooltip="Manastone" />
	<Page Name="HK2" ItemVDL="" Image="images/ub_empty.dds" Tooltip="" />
	<Page Name="HK3" ItemVDL="-1816047141" Image="images/ub_empty.dds" Tooltip="Shard (Expert)" />
	<Page Name="HK4" ItemVDL="1954118876" Image="images/ub_empty.dds" Tooltip="Shard (Master)" />
	<Page Name="HK5" ItemVDL="-1090779696" Image="images/ub_empty.dds" Tooltip="Heart (Expert)" />
	<Page Name="HK6" ItemVDL="1497639127" Image="images/ub_empty.dds" Tooltip="Heart (Master)" />
	<Page Name="HK7" ItemVDL="-974644649" Image="images/ub_empty.dds" Tooltip="Signet of Replenishment" />
	<Page Name="HK8" ItemVDL="-941739796" Image="images/ub_empty.dds" Tooltip="Signet of Greater Replenishment" />

</Page>
Again i need help replacing the contents of SourceResource with the Image contents in the Settings file.. Thanks!!
Reply With Quote
  #2  
Unread 03-17-2010, 03:14 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Long ago I tried to have a mod that changed ImageStyles on an element at run-time, but it didn't work. I'm not so sure you can change the graphical elements after the UI has loaded.

If you really want to have the graphics configured by the .txt file, I think you'll have to configure the whole ImageStyle there and then point the image to that style. Looks like you're trying to set the graphics twice or something.
Reply With Quote
  #3  
Unread 03-17-2010, 06:03 PM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

I just have the images in the xml just so they showed while trying this out. I didnt know the syntax for putting the Image value in the txt there so just left it with a valid working img until i figured it out or someone showed me.

was hoping it would be something similar to SourceResource="Parent.UtilBarData.HK1.Image" or something along those lines but couldnt get it working.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 08:20 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI