| dping28 |
03-17-2010 10:14 AM |
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!!
|