Thread: D3PDA UI Thread
View Single Post
Old 08-23-2022, 05:44 PM   #14
shillingworth
A Predatory Creeper
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 251
Interface Author - Click to view interfaces
Default

Well I kind of have it figured out. Currently I have the following configuration:

Spell0, this template is used to generate all 14 (via my lil' C# program), ignore the commented out label, excluded it for testing purposes.
Code:
<SpellGem item="CSPW_Spell0"> <ScreenID>CSPW_Spell0</ScreenID> <SpellIconOffsetX>2</SpellIconOffsetX> <SpellIconOffsetY>4</SpellIconOffsetY> <SpellIconSizeX>23</SpellIconSizeX> <SpellIconSizeY>20</SpellIconSizeY> <Size> <CX>177</CX> <CY>29</CY> </Size> <SpellGemDrawTemplate> <Holder>D3PDA_IWnd_GemHolder</Holder> <Background>D3PDA_IWnd_GemBackground</Background> </SpellGemDrawTemplate> </SpellGem> <!-- Spell Layout --> <LayoutBox item="Spell0"> <Layout>CSW_Spell0Layout</Layout> <Size> <CX>177</CX> <CY>29</CY> </Size> <Pieces>CSPW_Spell0</Pieces> <!--<Pieces>Spell0LabelDisplay</Pieces>--> </LayoutBox>


The CastSpellWnd screen element and the TileLayoutBox that houses the gems:
Code:
<LayoutVertical item="CSW_Layout"> <ResizeHorizontal>false</ResizeHorizontal> <ResizeVertical>true</ResizeVertical> </LayoutVertical> <TileLayoutBox item="SpellLayout"> <Layout>CSW_Layout</Layout> <Style_Transparent>false</Style_Transparent> <Style_Sizable>false</Style_Sizable> <MinHSize>198</MinHSize> <MaxHSize>198</MaxHSize> <MinVSize>261</MinVSize> <MaxVSize>435</MaxVSize> <LeftAnchorOffset>18</LeftAnchorOffset> <Size> <CX>177</CX> <CY>435</CY> </Size> <PaddingLeft>18</PaddingLeft> <Spacing>0</Spacing> <SecondarySpacing>0</SecondarySpacing> <Pieces>Spell0</Pieces> <Pieces>Spell1</Pieces> <Pieces>Spell2</Pieces> <Pieces>Spell3</Pieces> <Pieces>Spell4</Pieces> <Pieces>Spell5</Pieces> <Pieces>Spell6</Pieces> <Pieces>Spell7</Pieces> <Pieces>Spell8</Pieces> <Pieces>Spell9</Pieces> <Pieces>Spell10</Pieces> <Pieces>Spell11</Pieces> <Pieces>Spell12</Pieces> <Pieces>Spell13</Pieces> </TileLayoutBox> <Screen item="CastSpellWnd"> <TooltipReference>Allows you to cast your memorized spells</TooltipReference> <DrawTemplate>WDT_IWnd_Outer</DrawTemplate> <Layout>CSW_Layout</Layout> <Style_Border>true</Style_Border> <Style_Sizable>false</Style_Sizable> <Style_Transparent>false</Style_Transparent> <Style_Titlebar>false</Style_Titlebar> <Style_Closebox>false</Style_Closebox> <Style_Minimizebox>false</Style_Minimizebox> <MinHSize>198</MinHSize> <MaxHSize>198</MaxHSize> <MinVSize>261</MinVSize> <MaxVSize>435</MaxVSize> <Location> <X>0</X> <Y>435</Y> </Location> <Size> <CX>198</CX> <CY>435</CY> </Size> <!-- CY = (1 + gem_count) * 29 8 gems = 261 9 gems = 290 10 gems = 319 11 gems = 348 12 gems = 377 13 gems = 406 14 gems = 435 --> <Pieces>LayoutBox:IWnd_Template_Inner</Pieces> <Pieces>TileLayoutBox:SpellLayout</Pieces> <Pieces>SpellBook</Pieces> </Screen>


Note that IWnd_Template_Inner has UseInVerticalLayout set to false, so that it's not included in the layout calculations. That element is the one with the tiling border edge since DrawBackgroundMode only lets you toggle alpha blending, all it's other mode flags are no longer functional (at least not on my machine).

What happens with all that is that it will automatically resize to the available spell gems on your character. However the SpellBook element gets drawn at the very bottom of the window despite having nearly identical setup to the gems as far as layout is concerned. As in where the bottom would be if you had all 14 gems available. If I move the SpellBook element up into the SpellLayout element, it will render all empty elements at their size, as the UI currently does if you pick a cast spell window that has more gems than your character.
__________________

"Computers are like Air Conditioners, they stop working properly when you open Windows."
shillingworth is offline   Reply With Quote