-
June 12th, 2017, 00:06 #21
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:
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:
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:
Nice looking graphic by the way!Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 12th, 2017, 00:16 #22
damn thats fast!. and im going to have to digest this in the mornin and add it in. you sir will be offered some extensions when theyre done thankyou. i will post further progress as i have ONE other issue with decal use, which is going to be uber-novel, (and possibly outside the scope of the current software ) and then, its all down to paint and plannin. this inspires many questions and many ideas.
thanks again.
-
June 12th, 2017, 00:24 #23
damn thats fast!. and im going to have to digest this in the mornin and add it in. you sir will be offered some extensions when theyre done thankyou. i will post further progress as i have ONE other issue with decal use, which is going to be uber-novel, (and possibly outside the scope of the current software ) and then, its all down to paint and plannin. this inspires many questions and many ideas.
thanks again.
-
June 12th, 2017, 00:28 #24
Note, As the middle rectangle of the graphic isn't uniform, if the titlebar text resulted in the text width being wider than 303 pixels (the width of the middle rectangle) then it might result in an obvious line break in the graphic as the extra width would be added by tiling the <middle> graphic together.
You may then need to design the middle graphic to be tileable, and adjust the framedef to break on the tile border.
However, you can see an example of this on the right side of the titlebar - where the <right> component tiles onto the variable width <middle> component. It looks OK and you can only see it if you look closely. So you're probably OK.
The only real way to void this completely is to use uniform coloured graphics, with wouldn't look as good.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 12th, 2017, 00:33 #25
Attachment 19325 pre: your fixes, and my ammendments. naturally everything will be changed out. and i need to work out how to apply that decal shadowing to each window independantly that'l be fun. all the buttons and icons will be custom too but thats the easy part in some sense. thanks again trenloe.
-
June 12th, 2017, 00:37 #26
That's not putting the text in the right place - i.e. in the middle without going over the end graphics.
Make sure you've changed the <frame> offset in the template to <frame name="windowtitle" offset="120,0,120,0" /> See Issue #2 in my post above.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 12th, 2017, 00:41 #27
i know man this is the base state BEFORE any of your recomendations and fixes, i just thought you might wanna see the base state of the rest of the frames etc
-
June 12th, 2017, 00:43 #28Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 12th, 2017, 22:26 #29
im doing all i can to impliment this sir, but....this is going to mess up my core ruleset, UNLESS i add all those elements into the extfile and point the extension ruleset at it yes? hey, sorry if im hard work but im utterly new to this stuff and the learning curve is STEEP im grateful for your patience.
-
June 12th, 2017, 22:28 #30Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks