Home Forum Downloads My Favorites Register FAQ

Go Back   EQInterface Forums > Developer Discussion > XML modification help.
User Name
Password

Reply
 
Thread Tools Display Modes
Old 09-14-2008, 04:53 AM   #1
Stoplaughin
A Tundra Mammoth
 
Join Date: Mar 2004
Posts: 60
Interface Author - Click to view interfaces
Default SIDL changes with the 9-3-08 patch

LayoutVertical/LayoutHorizontal
  • Vertical or horizontal layout can be applied to any control.
  • It basically takes all <Pieces> and places them in a line vertically or horizontally. Sizing the control accordingly.
  • You can specify the pixel spacing between the pieces.
  • It will not move anchored pieces.
  • The control will size to fit some anchored pieces. Not sure yet which ones will and will not size the control.
  • It uses the <Size>, but ignores the <Point>.
  • For pieces that are dynamic like buffs, group members, container slots, etc., they will not be placed in the control and it will not make room for them if they are not supposed to be displayed. But if they suddenly appear, the control will dynamically size to add them.
  • It places the the pieces in the order they are declared in the parent control.
  • They can be nested. See TemplateContainer.
  • Its kind of buggy. For example if you just have a label for buff 0, EQ will crash. If you have the label and the button it works fine. Buff buttons don't seem to size parent control.
  • Will size windows with hard coded sizes!
You can find a couple of examples at http://www.eqinterface.com/download...nfo.php?id=5663 and http://www.eqinterface.com/download...nfo.php?id=5662.

TemplateContainer
I'm not sure what this is for other than a container. In the default UI its used to nest layouts. Although its supposed to be a template, I haven't seen any pieces in the template container inherit and properties of the template you specify.

TopLevelWndowList
From the sound and look, it may have the potential to allow you to create new windows. I haven't been able to create any though.
Stoplaughin is offline   Reply With Quote
Old 09-17-2008, 03:55 PM   #2
Stoplaughin
A Tundra Mammoth
 
Join Date: Mar 2004
Posts: 60
Interface Author - Click to view interfaces
Default

EDIT:
Sizable window inside of another window will never work. There is no place for EQ to save the size of the inside window. So the stuff below will only work until someone logs in again, but I'll leave the information here for informational purposes anyways. You might be able to get it to work if you make the top level item for the window a SC without borders where you want it to size and you make the child SC anchored so it can stretch and give it borders where the top level one doesn't.

I found another neat trick with LayoutVertical/LayoutHorizontal that allows a the user to size a window only in the direction you want them to. Only vertical or horizontal sizing. All other borders can be used to move the window.

Your main Screen (SC) element for your window must be changed to a TemplateContainer (TC). There is a bug with positioning when nesting TCs and SCs. TCs are subsets of SCs so they function almost identically. Then, you give your main TC either a vertical or horizontal layout property. You give it a border, and leave out the sides you want the user to be able to size. In your main TC you only have one piece which is a SC, because TCs cannot be sizable. You make this SC sizable and give it borders on the sides you want the user to be able to size it. With the location you can also tweak the relative positioning. Inside of the SC you can place your window elements, probably anchored so that they can size with the window.

Make sure any sub elements are TCs not SCs or you will see the positioning bug. There was also another bug. When I tried to only allow the window to be sized from the bottom, after the first sizing I could not size it again. Only allowing the top to be sized works, but sizing is kind of buggy. When you first move your mouse to size it bigger, you cannot size it smaller and visa-versa. The further you size it the faster it increases with size. All this makes it take some work to size, so it should only probably be used on things that don't need to be sized often.

Here is a little example with the buff window:
Code:
<Button item="BW_Buff0_Button"> <ScreenID>Buff0</ScreenID> <AutoStretch>true</AutoStretch> <TopAnchorToTop>true</TopAnchorToTop> <BottomAnchorToTop>true</BottomAnchorToTop> <LeftAnchorToLeft>false</LeftAnchorToLeft> <RightAnchorToLeft>false</RightAnchorToLeft> <TopAnchorOffset>0</TopAnchorOffset> <BottomAnchorOffset>19</BottomAnchorOffset> <LeftAnchorOffset>40</LeftAnchorOffset> <RightAnchorOffset>0</RightAnchorOffset> <ButtonDrawTemplate> <Normal>BlueIconBackground</Normal> <NormalDecal>BuffIcons</NormalDecal> </ButtonDrawTemplate> <DecalOffset> <X>1</X> <Y>1</Y> </DecalOffset> <DecalSize> <CX>17</CX> <CY>17</CY> </DecalSize> </Button> ... <Label item="BW_Buff0"> <EQType>500</EQType> <Font>1</Font> <Location> <X>0</X> <Y>4</Y> </Location> <Size> <CX>80</CX> <CY>13</CY> </Size> <TextColor> <R>255</R> <G>255</G> <B>255</B> </TextColor> <NoWrap>true</NoWrap> </Label> ... <Label item="BW_Buff0_Num"> <Font>1</Font> <Location> <X>84</X> <Y>4</Y> </Location> <Size> <CX>44</CX> <CY>12</CY> </Size> <Text>1</Text> <TextColor> <R>255</R> <G>255</G> <B>255</B> </TextColor> </Label> ... <LayoutVertical item="MUI2_L_Ver0"> <Padding>0</Padding> <Resize>true</Resize> </LayoutVertical> ... <TemplateContainer item="MUI2_BW_Spell0"> <Style_Transparent>true</Style_Transparent> <Size> <CX>120</CX> <CY>19</CY> </Size> <Pieces>BW_Buff0</Pieces> <Pieces>BW_Buff0_Num</Pieces> <Pieces>BW_Buff0_Button</Pieces> </TemplateContainer> ... <TemplateContainer item="MUI2_BW_BuffCont"> <Layout>MUI2_L_Ver0</Layout> <RelativePosition>true</RelativePosition> <Location> <X>-1</X> <Y>0</Y> </Location> <Size> <CX>120</CX> <CY>20</CY> </Size> <DrawTemplate>MUI2_WDT_BottomOnly</DrawTemplate> <Style_Transparent>true</Style_Transparent> <Style_Titlebar>false</Style_Titlebar> <Style_Closebox>false</Style_Closebox> <Style_Minimizebox>false</Style_Minimizebox> <Style_Border>true</Style_Border> <Style_Sizable>false</Style_Sizable> <Pieces>MUI2_BW_Spell0</Pieces> <Pieces>MUI2_BW_Spell1</Pieces> <Pieces>MUI2_BW_Spell2</Pieces> <Pieces>MUI2_BW_Spell3</Pieces> <Pieces>MUI2_BW_Spell4</Pieces> <Pieces>MUI2_BW_Spell5</Pieces> <Pieces>MUI2_BW_Spell6</Pieces> <Pieces>MUI2_BW_Spell7</Pieces> <Pieces>MUI2_BW_Spell8</Pieces> <Pieces>MUI2_BW_Spell9</Pieces> <Pieces>MUI2_BW_Spell10</Pieces> <Pieces>MUI2_BW_Spell11</Pieces> <Pieces>MUI2_BW_Spell12</Pieces> <Pieces>MUI2_BW_Spell13</Pieces> <Pieces>MUI2_BW_Spell14</Pieces> <Pieces>MUI2_BW_Spell15</Pieces> <Pieces>MUI2_BW_Spell16</Pieces> <Pieces>MUI2_BW_Spell17</Pieces> <Pieces>MUI2_BW_Spell18</Pieces> <Pieces>MUI2_BW_Spell19</Pieces> <Pieces>MUI2_BW_Spell20</Pieces> <Pieces>MUI2_BW_Spell21</Pieces> <Pieces>MUI2_BW_Spell22</Pieces> <Pieces>MUI2_BW_Spell23</Pieces> <Pieces>MUI2_BW_Spell24</Pieces> </TemplateContainer> <Screen item="MUI2_BW_BuffCont2"> <RelativePosition>true</RelativePosition> <Location> <X>0</X> <Y>-1</Y> </Location> <Size> <CX>120</CX> <CY>476</CY> </Size> <DrawTemplate>MUI2_WDT_TopOnly</DrawTemplate> <Style_Transparent>true</Style_Transparent> <Style_Titlebar>false</Style_Titlebar> <Style_Closebox>false</Style_Closebox> <Style_Minimizebox>false</Style_Minimizebox> <Style_Border>true</Style_Border> <Style_Sizable>true</Style_Sizable> <Pieces>MUI2_BW_BuffCont</Pieces> </Screen> <TemplateContainer item="BuffWindow"> <Layout>MUI2_L_Ver0</Layout> <RelativePosition>false</RelativePosition> <Location> <X>0</X> <Y>0</Y> </Location> <Size> <CX>122</CX> <CY>21</CY> </Size> <Style_Transparent>true</Style_Transparent> <DrawTemplate>MUI2_WDT_NoTop</DrawTemplate> <Style_Titlebar>false</Style_Titlebar> <Style_Closebox>false</Style_Closebox> <Style_Minimizebox>false</Style_Minimizebox> <Style_Border>true</Style_Border> <Style_Sizable>false</Style_Sizable> <Pieces>Screen:MUI2_BW_BuffCont2</Pieces> </TemplateContainer>

Last edited by Stoplaughin : 09-17-2008 at 05:16 PM.
Stoplaughin is offline   Reply With Quote
Old 09-17-2008, 10:23 PM   #3
Haliken
Quintessence of EQUI XML
 
Haliken's Avatar
 
Join Date: Sep 2002
Posts: 773
Interface Author - Click to view interfaces
Default

The main issue I've been wrangling with is it adding width/height for things I don't want it to. There's an easy solution though: say it's adding 44 width to my window that I don't want, create a dummy button with -44 width. The negative value will be added to (and so end up subtracting from) the total calculated width.

If you use, for example, a horizontal layout, but have an object that autostretches to the width of the object that uses said layout, EQ will crash.

I've often used buttons as my dummy objects but am not sure if another object type would have a smaller impact on performance.

Enok

Last edited by Haliken : 09-17-2008 at 11:22 PM.
Haliken is offline   Reply With Quote
Old 09-18-2008, 10:42 AM   #4
Savok
On tour since '99
 
Join Date: Sep 2002
Server: Innoruuk forever!
Posts: 473
Interface Author - Click to view interfaces
Default

I noticed that the pet winodw only resizes horizintally but I didn't see the layout command in there at all. Can you give an example of code?
__________________
Gold: 03/16/99 - 03/15/12 Silver: 03/16/12 - 03/15/18 Done:03/16/18
And with a heavy heart I bid adieu to Everquest Live.
Savok is offline   Reply With Quote
Old 09-18-2008, 03:45 PM   #5
Stoplaughin
A Tundra Mammoth
 
Join Date: Mar 2004
Posts: 60
Interface Author - Click to view interfaces
Default

Quote:
Originally Posted by Savok
I noticed that the pet winodw only resizes horizintally but I didn't see the layout command in there at all. Can you give an example of code?

The pet window is hard coded to only size horizontally. You can emulate the same thing, except the borders that do not size cannot be used to move the window. So you would need a title bar to move it. If you do not want the top of the window to be sizable, you can replace the top border with a title bar that looks like a border.

The basic idea is to create a sizable Screen with a draw template that has borders with zero width and height on the sides you do not want to user to be able to size. You then make a child Screen and anchor it so it fills the parent window. On the child Screen you give it borders on the sides the parent doesn't. Place all your window components inside the child window. In order to move the window the parent window will need a title bar. The title bar is placed underneath the top border. You can specify no top border and make your title bar look like a border, or you can take that into account when drawing your images. One thing you have to remember about sizing windows is that their size comes from the ini file not the size in the XML file. If someone loads your window and the unsizable dimension was different than what your window was made for, they either have to edit their ini file or uncheck "Keep Your Layout" when reloading the UI.

You can find an example at http://www.eqinterface.com/download....php?s=&id=5665. It allows you to size horizontally and vertically, but if you only wanted it to size horizontally you would replace MUI2_WDT_NoTop with:
Code:
<WindowDrawTemplate item="MUI2_WDT_NoTop"> <Background></Background> <Titlebar> <Left>MUI2_A_WndNull</Left> <Middle>MUI2_A_WndHor</Middle> <Right>MUI2_A_WndNull</Right> <OverlapLeft>0</OverlapLeft> <OverlapTop>0</OverlapTop> <OverlapRight>0</OverlapRight> <OverlapBottom>0</OverlapBottom> </Titlebar> <Border> <Top>MUI2_A_WndNull</Top> <Bottom>MUI2_A_WndNull</Bottom> <!-- now only sizable horizontally --> <Left>MUI2_A_WndVer</Left> <Right>MUI2_A_WndVer</Right> <TopLeft>MUI2_A_WndNull</TopLeft> <TopRight>MUI2_A_WndNull</TopRight> <BottomLeft>MUI2_A_WndNull</BottomLeft> <BottomRight>MUI2_A_WndNull</BottomRight> <RightTop>MUI2_A_WndNull</RightTop> <RightBottom>MUI2_A_WndNull</RightBottom> <LeftTop>MUI2_A_WndNull</LeftTop> <LeftBottom>MUI2_A_WndNull</LeftBottom> <OverlapLeft>0</OverlapLeft> <OverlapTop>0</OverlapTop> <OverlapRight>0</OverlapRight> <OverlapBottom>0</OverlapBottom> </Border> </WindowDrawTemplate>
Stoplaughin is offline   Reply With Quote
Old 09-18-2008, 05:51 PM   #6
derred
A Ghoul
 
Join Date: Dec 2002
Posts: 11
Interface Author - Click to view interfaces
Default

OMG, Sizable buff windows...with buff labels.


You rule!

One question: What would I need to do to flip the buff name to the other side?
__________________
-red

Last edited by derred : 09-18-2008 at 06:41 PM.
derred is offline   Reply With Quote
Old 10-23-2008, 08:20 AM   #7
myxiplx
A Weathered Clockwork
 
Join Date: Aug 2006
Posts: 313
Interface Author - Click to view interfaces
Default

Just wanted to say there's another way to make windows sizable in one direction only. You don't need to remove borders, just overlap them. I can't remember whether I needed an overlap of 1 or 2 in the end, but it definately worked, and it might give a better look to the piece.

Code:
<WindowDrawTemplate item="MUI2_WDT_NoTop"> <Background></Background> <Titlebar> <Left>MUI2_A_WndNull</Left> <Middle>MUI2_A_WndHor</Middle> <Right>MUI2_A_WndNull</Right> <OverlapLeft>0</OverlapLeft> <OverlapTop>0</OverlapTop> <OverlapRight>0</OverlapRight> <OverlapBottom>0</OverlapBottom> </Titlebar> <Border> <Top>MUI2_A_WndNull</Top> <Bottom>MUI2_A_WndNull</Bottom> <!-- now only sizable horizontally --> <Left>MUI2_A_WndVer</Left> <Right>MUI2_A_WndVer</Right> <TopLeft>MUI2_A_WndNull</TopLeft> <TopRight>MUI2_A_WndNull</TopRight> <BottomLeft>MUI2_A_WndNull</BottomLeft> <BottomRight>MUI2_A_WndNull</BottomRight> <RightTop>MUI2_A_WndNull</RightTop> <RightBottom>MUI2_A_WndNull</RightBottom> <LeftTop>MUI2_A_WndNull</LeftTop> <LeftBottom>MUI2_A_WndNull</LeftBottom> <OverlapLeft>1</OverlapLeft> <!-- now can't be sized from the left --> <OverlapTop>1</OverlapTop> <!-- or from the top --> <OverlapRight>0</OverlapRight> <OverlapBottom>0</OverlapBottom> </Border> </WindowDrawTemplate>
myxiplx is offline   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


All times are GMT -5. The time now is 12:04 PM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI