So, the main issues to deal with here are:
1) The framedef for this graphic needs to define three area - left, right and the middle rectangle. You don't need anything for the corners or the top and bottom.
2) There is a lot of the graphic on the left and right that needs to be outside of the text area. So we need to define an additional offset when using the base framedef.
3) The graphic is not the same height as the normal graphic used in the ruleset. So we need to do further editing in the "windowtitlebar" template to cater for this.
So, tackling each in order:
1) The framedef for this graphic.
The only resizing of this graphic is going to be left/right. So you don't need corners, top or bottom. You just need the left and right side and the middle.
In this graphic, the left side ends around 115 pixels from the left of the image, and the right send begins 115 pixels from the right of the image. So, you can simply defined the framedef as:
The <offset> defines the middle rectangle, with the other 8 components being created based off this rectangle. As the top and bottom offsets are both 0 there are no components along the top or bottom. Thus, giving us the <left> component being the whole height of the image up to 115 pixels from the left edge, the <right> component is the whole height of the image from 115 pixels from the right edge until the right edge, and <middle> is the whole height of the image between 115 from the left and 115 from the right.Code:<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle.png" />
<offset>115,0,115,0</offset>
</framedef>
2) Spacing the graphic so that the text only appears in the middle.
This is done in the control template that uses the windowtitle framedef, which is <template name="windowtitlebar"> - common\template_windows.xml.
The default 5E template uses the following:
<frame name="windowtitle" offset="35,-5,35,0" />
This means that the inside of the frame that will be used by the control is 35 pixels from either end - which is not enough for our graphic - we need at least 115. Maybe 120 to give a little bit of spacing between the edges and the text.
<frame name="windowtitle" offset="120,0,120,0" />
3) Height of the graphic
The 5E graphic is 56 pixels high, whereas this graphic is 42 pixels high. We need to limit the displaying control to 42 pixels high, otherwise it will tile the left, middle and right frame components to meet the height.
The template in 5E has a bounds and controlheight parameter that need to be changed:
This should then stop vertical tiling. This code includes the new frame offset from issue #2 above.Code:<template name="windowtitlebar">
<genericcontrol>
<bounds>0,0,0,42</bounds>
<frame name="windowtitle" offset="120,0,120,0" />
<font>windowtitle</font>
<parameters>
<windowmargin>60</windowmargin>
<controly>0</controly>
<controlheight>42</controlheight>
<minwidth>100</minwidth>
</parameters>
<script file="common/scripts/windowtitlebar.lua" />
</genericcontrol>
</template>
--------------------------------------------
So, putting the above two sets of code in your custom ruleset should give proper character spacing between the two end graphics and not tile vertically.
Giving something like this:
https://www.fantasygrounds.com/forum...chmentid=19323
Nice looking graphic by the way! :)