Page 3 of 4 First 1234 Last
  1. #21
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    24,476
    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>
    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.


    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>
    This should then stop vertical tiling. This code includes the new frame offset from issue #2 above.

    --------------------------------------------

    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!
    Attached Images Attached Images
    FG Con 16 Fantasy Grounds Online RPG Convention - Friday April 24th to Sunday April 26th, 2020
    Register at www.fg-con.com for all the latest info.

    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!

  2. #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.

  3. #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.

  4. #24
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    24,476
    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.
    FG Con 16 Fantasy Grounds Online RPG Convention - Friday April 24th to Sunday April 26th, 2020
    Register at www.fg-con.com for all the latest info.

    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!

  5. #25
    slow progress pre fixes..jpg 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.

  6. #26
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    24,476
    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.
    FG Con 16 Fantasy Grounds Online RPG Convention - Friday April 24th to Sunday April 26th, 2020
    Register at www.fg-con.com for all the latest info.

    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!

  7. #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

  8. #28
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    24,476
    Quote Originally Posted by hagrid70 View Post
    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
    OK, cool. Sorry for the confusion.
    FG Con 16 Fantasy Grounds Online RPG Convention - Friday April 24th to Sunday April 26th, 2020
    Register at www.fg-con.com for all the latest info.

    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!

  9. #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.

  10. #30
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    24,476
    Quote Originally Posted by hagrid70 View Post
    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.
    Yes, this is exactly what you should do.

    Just put the two sets of code I show in post #21 into you extension - as they are specifically names <framedef> and <template> entries they will override the underlying ruleset entries. That's what extensions do.
    FG Con 16 Fantasy Grounds Online RPG Convention - Friday April 24th to Sunday April 26th, 2020
    Register at www.fg-con.com for all the latest info.

    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in