Well tried a different oil I have around after verifying with the MSDS it wouldn't harm my keyboard at all, one of the compressor oils I have around which really is just mineral oil with a plastic-safe surfactant.
Took some more shots at the spell window and starting to develop an understanding of the layout stuff. Currently I have it in a state where it can squish the last gem to 0 height to visibly remove it and resize the window automatically. However it only works for the last element.
This is what I have now.
Spell0 (the template in my generator):
Code:
<LayoutVertical item="CSPW_Spell0Layout">
<ResizeHorizontal>true</ResizeHorizontal>
<ResizeVertical>true</ResizeVertical>
</LayoutVertical>
<Screen item="Spell0">
<Layout>CSPW_Spell0Layout</Layout>
<Size>
<CX>177</CX>
<CY>29</CY>
</Size>
<Pieces>CSPW_Spell0</Pieces>
<Pieces>Spell0LabelDisplay</Pieces>
</Screen>
Also added UseInLayoutVertical and Horizontal to false in the Spell0LabelDisplay LayoutBox.
The scene graph for this (the actual window part):
Code:
<LayoutVertical item="CSW_LayoutV">
<ResizeHorizontal>true</ResizeHorizontal>
<ResizeVertical>true</ResizeVertical>
</LayoutVertical>
<Screen item="CSPW_VerticalOrientationTemplate">
<ScreenID>CSPW_VerticalOrientationTemplate</ScreenID>
<RelativePosition>true</RelativePosition>
<AutoStretch>true</AutoStretch>
<TopAnchorOffset>0</TopAnchorOffset>
<BottomAnchorOffset>29</BottomAnchorOffset>
<LeftAnchorOffset>18</LeftAnchorOffset>
<RightAnchorOffset>0</RightAnchorOffset>
<TopAnchorToTop>true</TopAnchorToTop>
<BottomAnchorToTop>false</BottomAnchorToTop>
<LeftAnchorToLeft>true</LeftAnchorToLeft>
<RightAnchorToLeft>false</RightAnchorToLeft>
<MinHSize>198</MinHSize>
<MaxHSize>198</MaxHSize>
<MinVSize>261</MinVSize>
<MaxVSize>435</MaxVSize>
<UseInLayoutVertical>false</UseInLayoutVertical>
<UseInLayoutHorizontal>false</UseInLayoutHorizontal>
</Screen>
<TileLayoutBox item="CSPW_SpellGemLayout">
<ScreenID>CSPW_SpellGemLayout</ScreenID>
<Style_Transparent>true</Style_Transparent>
<Style_TransparentControl>true</Style_TransparentControl>
<Style_Sizable>false</Style_Sizable>
<HorizontalFirst>true</HorizontalFirst>
<FirstPieceTemplate>true</FirstPieceTemplate>
<SnapToChildren>true</SnapToChildren>
<AutoStretch>true</AutoStretch>
<BottomAnchorToTop>false</BottomAnchorToTop>
<RightAnchorToLeft>false</RightAnchorToLeft>
<Spacing>0</Spacing>
<SecondarySpacing>0</SecondarySpacing>
<Pieces>Screen:Spell1</Pieces>
<Pieces>Screen:Spell2</Pieces>
<Pieces>Screen:Spell3</Pieces>
<Pieces>Screen:Spell4</Pieces>
<Pieces>Screen:Spell5</Pieces>
<Pieces>Screen:Spell6</Pieces>
<Pieces>Screen:Spell7</Pieces>
<Pieces>Screen:Spell8</Pieces>
<Pieces>Screen:Spell9</Pieces>
<Pieces>Screen:Spell10</Pieces>
<Pieces>Screen:Spell11</Pieces>
<Pieces>Screen:Spell12</Pieces>
<Pieces>Screen:Spell13</Pieces>
</TileLayoutBox>
<Screen item="CastSpellWnd">
<TooltipReference>Allows you to cast your memorized spells</TooltipReference>
<DrawTemplate>WDT_IWnd_Outer</DrawTemplate>
<Layout>CSW_LayoutV</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>
<Style_ClientMovable>true</Style_ClientMovable>
<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:CSPW_SpellGemLayout</Pieces>
<Pieces>Screen:CSPW_VerticalOrientationTemplate</Pieces>
<Pieces>Screen:CSPW_VerticalOrientationBook</Pieces>
</Screen>
It's basically adapting the default UI's way of doing things. Seems like a weird indirect way of sizing the screen element from another screen element in order to squish yet another screen element. I'm all for using a cheap hack to get things running but this one gave me a genuine out loud WTF moment when I realized what they were doing.