PDA

View Full Version : creating theme extensions, and having a BUNCH of questions.



hagrid70
June 6th, 2017, 01:27
im trying my hand at building extensions and im wondering how about 99% of this stuff works. most specifically how offset works, (i know the short version of this, but offset doesnt seem to move titlebars around for example)

im also trying to work out whether i can 9slice the hotkeys at the bottom, so that i can have 'stretchy hotkeys with decent defined graphics.

how i can change the decal...can i 9slice it ON TOP of a tiled desktop background?

then i have things like the text box at the bottom of the chatbar (can i shunt this around a little?)

any help or advice would be most appreciated pls

Trenloe
June 6th, 2017, 01:42
As mentioned here: https://www.fantasygrounds.com/modguide/windowing.xcp "The <offset> tag contains a number value by which the edge is adjusted after the anchoring calculations. A positive value indicates a shift to the right or down, a negative to the left or up." So, it is applied after any initial anchoring. There are many, many examples of <offset> used in the FG rulesets - have a look at some examples there to see what can be done. If it's not working for you on something specific, maybe provide an example piece of code?

The hotkey bar is defined in CoreRPG in the <hotkeybar> definition in gamelements.xml

For creating decals, see the "Custom Decal Tutorial" here: https://www.fg-con.com/free-downloads/

The chat window is defined in <windowclass name="chat"> in desktop\desktop_classes.xml Yes, you can move the text box around - it's the <basicchatentry name="entry" /> control, whose template is defined in desktop\template_desktop.xml - the positioning is defined in the template, but you can override this in the <basicchatentry name="entry" /> entry in the base <windowclass name="chat">

With all of these controls, you're going to need to learn about anchoring, which is what primarily determines the position and size of controls. A lot of info on that here: https://www.fantasygrounds.com/modguide/windowing.xcp

There's also some pointers to other reference material here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset

And - remember: use a good text editor with a decent "find in files" functionality - I use Notepad++. You will use this a lot to track down controls and templates in the FG ruleset code. Extract CoreRPG to somewhere on your hard drive to allow you to use find in files.

hagrid70
June 6th, 2017, 01:48
youre a legend sir. it looks like this art experiment is rapidly turning into a coding exercise, which ive never done before... BUT once ive got this sorted i can pump out gorgeous interfaces for all styles of gameplay :D as always thank you for your unrelenting support.

Trenloe
June 6th, 2017, 02:37
BUT once ive got this sorted i can pump out gorgeous interfaces for all styles of gameplay :D as always thank you for your unrelenting support.
No worries. I'll look forward to seeing some gorgeous results. :)

hagrid70
June 6th, 2017, 09:41
maestro; following you instructions,
The hotkey bar is defined in CoreRPG in the <hotkeybar> definition in gamelements.xml i assume that i need to turn the gameelements xml into a zip and then extract it.
it imediately asks for a password. is that normal? i certainly have no idea what to do next?

Trenloe
June 6th, 2017, 15:52
i assume that i need to turn the gameelements xml into a zip and then extract it.
it imediately asks for a password. is that normal?
It's a text file. Open it in Notepad++ or another text editor (or a dedicated XML text file editor if you have a preference).

hagrid70
June 6th, 2017, 21:53
righto ive learnt a bunch of stuff fairly adequately, but i have found a problem where i cannot identlfy the issue. ive created a titlebar, which is somewhat wider than the generic one in the graphics folder. now initially i changed the values in the xml to reflect this size and it loaded in just fine, BUT set somewhat to one side. it moved across the screen and stayed 'centered'(somewhat) as i resized the window. so then i 9sliced it into three pieces, left right and center.
instantly the file centers on screen perfectly, but the two sides are squashed in towards the center. these occurs proportionally across all the windows that have titlebars. so everything is now centered, moves smoothly, and is crushed :D can i have some advice on how to move the sides outwards to the correct distance from the edges of the frame please. if anyone can make sense of this gobblidigook.
and... all the best to any who read this.
:D

finally: if i add lines to a graphics xml file, will they 'override' the default settings that FG seems to fall back to? this seems to be the case, but id like to be sure, if at all possible.

Trenloe
June 6th, 2017, 22:44
can i have some advice on how to move the sides outwards to the correct distance from the edges of the frame please.
Please post the XML you're using.


finally: if i add lines to a graphics xml file, will they 'override' the default settings that FG seems to fall back to? this seems to be the case, but id like to be sure, if at all possible.
Extensions, and layered rulesets, override the "stuff" loaded earlier. For example, the order of load for Pathfinder (with an extension) would be: CoreRPG -> 3.5E -> PFRPG -> Extension. So, code/XMl in extension would override anything to the left, code/XML in 3.5E would override CoreRPG but PFRPG and the extension would override 3.5E. Hope that makes sense.

hagrid70
June 6th, 2017, 22:47
you mean this stuff sir?

<root>
<!-- Desktop background -->
<framedef name="desktop">
<bitmap file="graphics/frames/desktop.png" />
<middle rect="0,0,512,512" />
</framedef>
<framedef name="shortcuts">
<bitmap file="graphics/frames/desktop.png" />
<left rect="512,0,10,512" />
<middle rect="522,0,80,512" />
<right rect="602,0,10,512" />
</framedef>
<!-- Windows -->
<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle.png" />
<topleft rect="0,0,117,42" />
<top rect="117,0,299,42" />
<topright rect="416,0,117,42" />
<left rect="0,0,0,0" />
<middle rect="0,0,0,0" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
<offset>268,0,533,42</offset>
</framedef>
<framedef name="tabs">
<bitmap file="graphics/frames/tabs.png" />
<topleft rect="0,0,18,13" />
<left rect="0,13,18,455" />
<bottomleft rect="0,468,18,24" />
</framedef>

<!-- Control frames -->
<framedef name="groupbox">
<bitmap file="graphics/frames/groupbox.png" />
<offset>18,18,17,17</offset>
</framedef>
<framedef name="fieldlight">
<bitmap file="graphics/frames/fieldlight.png" />
<offset>12,12,12,12</offset>
</framedef>
<framedef name="fielddark">
<bitmap file="graphics/frames/fielddark.png" />
<offset>12,12,12,12</offset>
</framedef>
<framedef name="durationadjustment">
<topleft rect="0,0,12,12" />
<bitmap file="graphics/frames/durationadjustment.png" />
<top rect="12,0,200,12" />
<topright rect="212,0,12,12" />
<left rect="0,12,12,187" />
<middle rect="12,12,200,187" />
<right rect="212,12,12,187" />
<bottomleft rect="0,199,12,12" />
<bottom rect="12,199,200,12" />
<bottomright rect="212,199,12,12" />
<decal rect="205,211,19,15" />
</framedef>
<framedef name="slottedmodifier">
<bitmap file="graphics/frames/slottedmodifier.png" />
<topleft rect="0,0,37,12" />
<top rect="37,0,160,12" />
<topright rect="212,0,12,12" />
<left rect="0,12,37,187" />
<middle rect="37,12,160,187" />
<right rect="212,12,12,187" />
<bottomleft rect="0,199,37,12" />
<bottom rect="37,199,160,12" />
<bottomright rect="212,199,12,12" />
</framedef>
<framedef name="slottedbonus">
<bitmap file="graphics/frames/slottedbonus.png" />
<topleft rect="0,0,68,12" />
<top rect="68,0,128,12" />
<topright rect="212,0,12,12" />
<left rect="0,12,68,187" />
<middle rect="68,12,128,187" />
<right rect="212,12,12,187" />
<bottomleft rect="0,199,68,12" />
<bottom rect="68,199,128,12" />
<bottomright rect="212,199,12,12" />
</framedef>


<!-- Chat window -->
<framedef name="chatbox">
<bitmap file="graphics/frames/utilitybox5.png" />
<topleft rect="0,0,200,200" />
<top rect="200,0,10,200" />
<topright rect="210,0,200,200" />
<left rect="0,200,200,10" />
<middle rect="200,200,210,10" />
<right rect="210,200,200,10" />
<bottomleft rect="0,210,200,200" />
<bottom rect="200,210,210,200" />
<bottomright rect="210,210,200,200" />
<insideoffset>0,0,5,6</insideoffset>
</framedef>

<!-- Hot key bar -->
<framedef name="hotkeybox">
<bitmap file="graphics/frames/hotkeybox.png" />
<topleft rect="0,0,40,36" />
<top rect="40,0,60,36" />
<topright rect="100,0,40,36" />
<left rect="0,0,0,0" />
<middle rect="0,0,0,0" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
<offset>2,5,2,2</offset>
</framedef>
<framedef name="hotkeytitlebox">
<bitmap file="graphics/frames/hotkeytitlebox.png" />
<offset>0,0,4,5</offset>
</framedef>

<!-- Character selection -->
<framedef name="charselect">
<bitmap file="graphics/frames/charselect.png" />
<offset>150,150,150,150</offset>
<insideoffset>0,0,5,7</insideoffset>
</framedef>
<framedef name="charselectentry">
<bitmap file="graphics/frames/charselectentry.png" />
<offset>12,12,12,12</offset>
</framedef>

<!-- Utility windows -->
<framedef name="utilitybox">
<bitmap file="graphics/frames/utilitybox.png" />
<offset>150,150,150,150</offset>
<insideoffset>0,0,10,10</insideoffset>
</framedef>
<framedef name="utilityboxfortabs">
<bitmap file="graphics/frames/utilitybox4.png" />
<topleft rect="0,0,200,200" />
<top rect="200,0,10,200" />
<topright rect="210,0,200,200" />
<left rect="0,200,200,210" />
<middle rect="200,200,210,210" />
<right rect="210,200,200,210" />
<bottomleft rect="0,210,200,200" />
<bottom rect="200,210,210,200" />
<bottomright rect="210,210,200,200" />
<insideoffset>0,0,8,18</insideoffset>
</framedef>
<framedef name="utilitybox2">
<bitmap file="graphics/frames/utilitybox2.png" />
<offset>150,150,150,150</offset>
<insideoffset>0,0,7,8</insideoffset>
</framedef>
<framedef name="utilitybox3">
<bitmap file="graphics/frames/utilitybox3.png" />
<offset>150,150,150,150</offset>
<insideoffset>0,0,5,7</insideoffset>
</framedef>
<framedef name="scrollboxfortabs">
<bitmap file="graphics/frames/scrollbox.png" />
<topleft rect="0,0,115,110" />
<top rect="115,0,355,110" />
<topright rect="470,0,85,110" />
<left rect="0,110,85,400" />
<middle rect="85,110,385,400" />
<right rect="470,110,85,400" />
<bottomleft rect="0,533,85,37" />
<bottom rect="85,533,385,37" />
<bottomright rect="470,533,85,37" />
<insideoffset>0,0,10,8</insideoffset>
</framedef>
<framedef name="referencepage">
<bitmap file="graphics/frames/referencepage.png" />
<offset>90,60,90,60</offset>
<insideoffset>0,0,10,6</insideoffset>
</framedef>

<!-- Combat tracker -->
<framedef name="ctbox">
<bitmap file="graphics/frames/ctbox.png" />
<offset>32,32,19,50</offset>
<insideoffset>0,0,7,7</insideoffset>
</framedef>
<framedef name="ctentrybox">
<bitmap file="graphics/frames/ctentrybox.png" />
<offset>28,3,5,6</offset>
</framedef>
<framedef name="ctentrybox_active">
<bitmap file="graphics/frames/ctentrybox_active.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_friend">
<bitmap file="graphics/frames/ctentrybox_friend.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_friend_active">
<bitmap file="graphics/frames/ctentrybox_friend_active.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_neutral">
<bitmap file="graphics/frames/ctentrybox_neutral.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_neutral_active">
<bitmap file="graphics/frames/ctentrybox_neutral_active.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_foe">
<bitmap file="graphics/frames/ctentrybox_foe.png" />
<offset>37,16,14,17</offset>
</framedef>
<framedef name="ctentrybox_foe_active">
<bitmap file="graphics/frames/ctentrybox_foe_active.png" />
<offset>37,16,14,17</offset>
</framedef>

<!-- Party Sheet -->
<framedef name="partysheet">
<bitmap file="graphics/frames/partysheet.png" />
<offset>25,40,25,25</offset>
<insideoffset>0,0,7,7</insideoffset>
</framedef>

<!-- Manual Roll -->
<framedef name="manualroll_entry">
<bitmap file="graphics/frames/manualroll_entry.png" />
<offset>6,4,9,7</offset>
</framedef>

<!-- Characters -->
<framedef name="charsheet">
<bitmap file="graphics/frames/utilitybox5.png" />
<topleft rect="0,0,200,200" />
<top rect="200,0,10,200" />
<topright rect="210,0,200,200" />
<left rect="0,200,200,10" />
<middle rect="200,200,10,10" />
<right rect="210,200,200,10" />
<bottomleft rect="0,210,200,200" />
<bottom rect="200,210,10,200" />
<bottomright rect="210,210,200,200" />
<insideoffset>0,0,7,7</insideoffset>
</framedef>
<framedef name="acicon">
<bitmap file="graphics/frames/acicon.png" />
<topleft rect="0,0,40,44" />
</framedef>

<!-- Images -->
<framedef name="imagebox">
<bitmap file="graphics/frames/imagebox.png" />
<offset>150,135,150,150</offset>
<insideoffset>0,0,20,22</insideoffset>
</framedef>

<!-- Story and Notes -->
<framedef name="storybox">
<bitmap file="graphics/frames/storybox.png" />
<offset>41,172,41,49</offset>
<insideoffset>0,0,10,5</insideoffset>
</framedef>

<!-- Menu Bar Theme Frame - Dulux-Oz request -->
<framedef name="frmMenubarTheme">
<bitmap file="graphics/frames/desktop.png" />
<left rect="512,0,25,512" />
<middle rect="537,0,35,512" />
<right rect="572,0,40,512" />
</framedef>
</root>

Trenloe
June 6th, 2017, 22:49
you mean this stuff sir?

...
lots of xml
...

Yes, but please point me to the specific section you're having issues with.

hagrid70
June 6th, 2017, 22:51
if you can read this like text, youre a braver man than i sir :D

hagrid70
June 6th, 2017, 22:55
<!-- Windows -->
<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle.png" />
<topleft rect="0,0,117,42" />
<top rect="117,0,299,42" />
<topright rect="416,0,117,42" />
<left rect="0,0,0,0" />
<middle rect="0,0,0,0" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
<offset>268,0,533,42</offset>
</framedef>
<framedef name="tabs">
<bitmap file="graphics/frames/tabs.png" />
<topleft rect="0,0,18,13" />
<left rect="0,13,18,455" />
<bottomleft rect="0,468,18,24" />
</framedef>

this is the stuff i THINK. it certainly references the appropriate files, i THINK the problem is some sort of association further up the foodchain which is trunkating the title image.
i wonder.... IF carving this into three bits as ive done here centers it, but misplaces the left and right side portions. then what happens if i zero them out and change the parameters of the top rectangle to contain the whole image?

hagrid70
June 6th, 2017, 23:10
19266

turning the title into a top center slice, places it correctly, and it also moves correctly with the window resize, however as indicated its chopped off at each end. and changing the width parameter does nothing at all. super odd.

Trenloe
June 6th, 2017, 23:41
You need to find the <windowclass> for that specific window and see how the title is setup there. Looking at <framedef> is the lowest level and doesn't control the exact placing of the frame, just the various bits that could be used to put the frame together.

hagrid70
June 6th, 2017, 23:49
you sir, are a machine. :D i will check this tomorrow after work. ( i assume based on your comment further up about load order, that i can make these ammendments inside the graphics file instead of having to change these further upstream...once i know what changes are required of course. ) and this reminds me, i recall the experiments you did with my tokens a while back. if i can repay your kindness with a little art, you will ask i hope.

all the best
hagrid

Wookiee420
June 7th, 2017, 07:18
you sir, are a machine. :D i will check this tomorrow after work. ( i assume based on your comment further up about load order, that i can make these ammendments inside the graphics file instead of having to change these further upstream...once i know what changes are required of course. ) and this reminds me, i recall the experiments you did with my tokens a while back. if i can repay your kindness with a little art, you will ask i hope.

all the best
hagrid

That is correct, when i built the base information for you i set it up so that through load order your stuff will take effect no matter what (providing its the only theme extension you use, let me know if there is an random error with a different extension you also use i can fix that hopefully easily)

hagrid70
June 11th, 2017, 13:48
well ive hit a roadblock. of sorts. the titlebar re sizes in proportion to the text in the title, and the chain of information seems (as trenloe sugests), to lead back to a sourcefile, which appears to be windowtitlebar.lua im now stuck at this point trying to identify the portion of script with notes the length of the title text, so that it can be applied to the graphics under the text further downstream. guidance would be most appreciated please, if anyone can spare the energy.

Trenloe
June 11th, 2017, 18:10
The updatePosition() function sets the static bounds of the windowtitle control: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setStaticBounds and also sets the width of the title textwidget: https://www.fantasygrounds.com/refdoc/textwidget.xcp#setMaxWidth

This is all based off the width of the title text and the width of the window. So, we now know that trying to set static bounds within a control definition won't actually help, as it will be overridden based off the window width and text width.

So, we're back to looking at the <framedef> data and how this splits up the graphic into it's smaller parts that are used to construct the titlebar graphic as the width changes.

Can you provide the windowtitle.png graphic you're using? And also the latest <framedef name="windowtitle"> code you're using?

Also, which ruleset is this based on?

hagrid70
June 11th, 2017, 22:53
righto, ive used the dnd 5e code as a base.19321
heres the png im using, which as you can see has much wider 'bookends' than the default.
im including the xml file directly so i dont miss anything out , ( because ive messed with it quite a bit, hence also including the generic template as well.)
but the code is: <!-- Windows -->
<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle2.png" />
<topleft rect="0,0,117,42" />
<top rect="117,0,299,42" />
<topright rect="416,0,117,42" />
<left rect="0,0,0,0" />
<middle rect="0,0,0,0" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
<offset>268,0,533,42</offset>
</framedef>>
<framedef name="tabs">
<bitmap file="graphics/frames/tabs.png" />
<topleft rect="0,0,18,13" />
<left rect="0,13,18,455" />
<bottomleft rect="0,468,18,24" />
</framedef>
<template name="windowtitlebar">
<genericcontrol>
<bounds>0,0,-1,40</bounds>
<frame name="windowtitle" offset="30,0,30,0" />
<font>windowtitle</font>
<parameters>
<windowmargin>60</windowmargin>
<controly>0</controly>
<controlheight>40</controlheight>
<minwidth>100</minwidth>
</parameters>
<script file="common/scripts/windowtitlebar.lua" />
</genericcontrol>
</template>


i hope you can make sense of this sir because im trying and failing :)

hagrid70
June 11th, 2017, 23:01
righto, ive used the dnd 5e code as a base.19321
heres the png im using, which as you can see has much wider 'bookends' than the default.
i cant include the xml file directly here. but i can email or pm it to you if you wish, (and ive messed with it quite a bit, as per the code listed here)
but the code is: <!-- Windows -->
<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle2.png" />
<topleft rect="0,0,117,42" />
<top rect="117,0,299,42" />
<topright rect="416,0,117,42" />
<left rect="0,0,0,0" />
<middle rect="0,0,0,0" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
<offset>268,0,533,42</offset>
</framedef>>
<framedef name="tabs">
<bitmap file="graphics/frames/tabs.png" />
<topleft rect="0,0,18,13" />
<left rect="0,13,18,455" />
<bottomleft rect="0,468,18,24" />
</framedef>
<template name="windowtitlebar">
<genericcontrol>
<bounds>0,0,-1,40</bounds>
<frame name="windowtitle" offset="30,0,30,0" />
<font>windowtitle</font>
<parameters>
<windowmargin>60</windowmargin>
<controly>0</controly>
<controlheight>40</controlheight>
<minwidth>100</minwidth>
</parameters>
<script file="common/scripts/windowtitlebar.lua" />
</genericcontrol>
</template>


i hope you can make sense of this sir because im trying and failing :)

Trenloe
June 12th, 2017, 00:06
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:


<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:


<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:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=19323

Nice looking graphic by the way! :)

hagrid70
June 12th, 2017, 00:16
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 :D) and then, its all down to paint and plannin. this inspires many questions and many ideas.

thanks again.

hagrid70
June 12th, 2017, 00:24
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 :D) and then, its all down to paint and plannin. this inspires many questions and many ideas.

thanks again.

Trenloe
June 12th, 2017, 00:28
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.

hagrid70
June 12th, 2017, 00:33
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 :D that'l be fun. all the buttons and icons will be custom too but thats the easy part in some sense. thanks again trenloe.

Trenloe
June 12th, 2017, 00:37
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.

hagrid70
June 12th, 2017, 00:41
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 :D

Trenloe
June 12th, 2017, 00:43
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 :D
OK, cool. Sorry for the confusion. :)

hagrid70
June 12th, 2017, 22:26
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 :D im grateful for your patience.

Trenloe
June 12th, 2017, 22:28
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 :D 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.

hagrid70
June 12th, 2017, 23:10
IT WORKS ITS ALIVE!!!!!!!! MAH HAHAHAHAH thus begins a range of new templates for all tastes and flavours. i will give you a copy of each when theyre done if youre keen sir.
i do have ONE further question: and its curley: here goes: the FG logo shadows over whatever desktop is placed behind it. i know it can easily be replaced with a colour image or turned off.

im wondering if that logo is stored somewhere accessable, and if it obeys the same rules as all the other images, because if it does: then i can use one tile for colour, and another for luminance, which opens up TON of really cool scalable textures and effects.

legend. thanks man.

Trenloe
June 12th, 2017, 23:32
im wondering if that logo is stored somewhere accessable, and if it obeys the same rules as all the other images, because if it does: then i can use one tile for colour, and another for luminance, which opens up TON of really cool scalable textures and effects.
These are known as "decals". Look in CoreRPG graphics\decals for the base SW PNG file. It's defined as a FG <icon> resouce in graphics\graphics_icons.xml. So, it can do what other icon resources can do - and is placed on top of the desktop graphics from the desktop framedef.

hagrid70
June 14th, 2017, 00:25
WIP.. long way to go. but its slowly happenin...19368

hagrid70
June 15th, 2017, 10:28
so... it seems that it is not possible to use multiple images in the same 'channel' for example: using one image centered as a decal, and then nine slicing another to act as a border over the same background? has anyone tried this? and is there a workaround :D dito for using decals inside pop up windows as well as the desktop?

hagrid70
June 15th, 2017, 12:20
things left to resolve, test, learn and experiment with (input welcome) :

work on raising lower inside border on ALL tab windows to move up fields etc for cleaner silhouette and balanced layout.

to change position and scale of corner arrow on ALL windows.

to replace colour sampler, and weather sampler borders (background images; completely).

resolve whether decals be put into floating windows.(like the ones that pop open when you hit a tab in the sidebar)

is there ANYWHERE where FG will notice and accept a GIF file.(because animated effects would be gorgeous).

can i use more than one png decal on the desktop.( like a central image which just sits there, as does the original smiteworks logo, and ALSO a translucent image, fading from the corners, via nineslice..)

tons of art left to do. (and a sneaking suspicion i have left tabs out of the sidebar) and i need to find a pilot to test fly this lot, when its done19388 :D

Wookiee420
June 15th, 2017, 15:13
unfortunately there is no gif support, you can only use one decal at a time, you can't put decals in windows, FG is built on old old old architecture, these things just cannot be done currently :(

LordEntrails
June 15th, 2017, 15:26
Though you can only do one decal (it's a frame right?), you might be able to layer bitmap widgets since they have the ability to bringtofront and sendtoback. https://www.fantasygrounds.com/refdoc/widget.xcp
(Though they are bitmaps and wouldn't have transparency right?)

Trenloe
June 15th, 2017, 15:50
can i use more than one png decal on the desktop.( like a central image which just sits there, as does the original smiteworks logo, and ALSO a translucent image, fading from the corners, via nineslice..)
Maybe there is confusion over what a "decal" is? A few versions ago, FG added the ability to have a selectable image laid on top of the desktop. The image is enabled/selected from the campaign options menu "Desktop: Decal Image".
As I mentioned above, this decal is a FG <icon> resource that is displayed over the top of the desktop. This does not have a framedef and cannot be sliced.

See "Custom Decal Tutorial" here for info on adding a custom decal to the ruleset/extension:" https://www.fg-con.com/free-downloads/

There is also a <decal> entry in the "desktop" framedef that defines (as part of the slicing of the desktop image) an image that will be used at the center of the desktop. A basic example is here: https://www.fantasygrounds.com/forums/showthread.php?18836-Background-wallpaper-question&p=149499&viewfull=1#post149499

So, you can have the usual sliced desktop layout, with a central image defined in <decal> in the "desktop" framedef. You can then also have an image on top of this - the selectable "decal" from the campaign options menu.

Trenloe
June 15th, 2017, 15:53
dito for using decals inside pop up windows as well as the desktop?
Using the second, selectable "decal" (an <icon> resource), you absolutely can put images inside a pop up window. Use a generic FG control: https://www.fantasygrounds.com/refdoc/genericcontrol.xcp

hagrid70
June 16th, 2017, 17:43
you guys are awesome support, and i am most grateful. thank you for your time and attention :D