PDA

View Full Version : Add a frame?



Jim1829
October 7th, 2009, 06:23
Hi. In preparation for the 2010 release of Dark Sun, I've started working on the 4E ruleset. As none of the setting specific material's have been released, I have been just working on mods and graphics. Graphics are a big deal for this ruleset because I want to evoke just the right feel. So, what I'm trying to do is set dunes along the bottom boder, under the custom die boxes. I've succeeded by including it as part of the decal.
935
But when I expand out of windowed mode, this ceases to work.
936
So, I figured I'd go into the graphics_frames.xml and try and add a frame. No dice.
937
Can I add a frame? Or, is there a way I can get the lower right corner of my dunes to lock into the lower right corner of the window whether it's windowed or not?

Jim1829
October 12th, 2009, 18:58
Anyone? Don't be shy. :D

MeepoSose
October 12th, 2009, 19:45
<framedef name="desktop">
<bitmap file="frames/desktop.png" />
<left rect="0,0,581,1636" />
<middle rect="582,0,515,1636" />
<right rect="1097,0,120,1636" />
<decal rect="1640,850,222,80" />
</framedef>


I am not sure if this would definitely work or not, but I wonder if you can add a bottom section.

It's been a little while since I tinkered with this so I might be wrong...

Decal gets centered in the middle both horizontally and vertically. For your case, maybe have the dune build up on the right, flatten out for the middle and then slant back downward for your left. Then have the sun be included with your "Dark Sun" Title for your decal. As your screen width increases and decreases, the "middle" definition is tiled to fill in the gap IIRC. For that reason, it would be important to have the height of your dune not change in the middle section.

Doswelk
October 14th, 2009, 16:19
The only thing I did (when I making a Modern 20 skin) what to ensure that the edges tiled.

I know it's not exactly what you want but if you make the sand dunes tile on the left and right edges then when the screen size changes the dunes will tile nicely.

(edit) Hmm just noticed the dunes move up the screen, I cannot remember how I got round that right now (I'll see if I did not lose the ruleset in the great hard drive failure)

Foen
October 15th, 2009, 06:24
The background conforms to standard frame layout (see the Library entry (https://www.fantasygrounds.com/modguide/resources.xcp) and the anatomy of a ruleset (https://wiki.witheredlands.co.uk/anatomy0100.ashx), the latter is increasingly out of date) and I think you should try to position the dunes to be in the bottom right corner. Unfortunately the 'bottom' section tiles from left to right, so you will have a discontinuity where the 'bottom' section meets the 'bottomright' corner in most cases. Having the dunes in the bottom section a fixed height will make it less obvious.

Hope that helps

Stuart

Jim1829
October 16th, 2009, 22:35
Thanks! I'll give it a try.

Looks like I may have to replace my dunes with ones that will tile on the right and left edges.

drahkar
November 1st, 2009, 02:28
I'm not sure if you have solved this yet, but what I would recommend is using the Lua scripting to place the image like they do with the buttons and images for things like notes, token box and libraries. The xml placement method does not have the ability to allow placement to change with the resizing of the window.

Foen
November 1st, 2009, 05:41
I don't think there is a Lua event which fires when the screen resizes (it would be useful for keeping the dice in the right place if it did), but you could create a desktop panel and put the dunes there, as drahkar suggests. I'm not sure if panels can overlap though, so it may have to stop short of the right hand icon bar.

drahkar
November 1st, 2009, 11:03
Foen is correct. Sorry for the confusion. I just confirmed there is no screen resizing code in Lua or function hooks in the code.

Perhaps in a future release we'll be able to declare alignment on the image definition in the XML so that instead of having 0,0 be top left, it could be top right or even bottom right.

Something like:




<framedef name="indexboxtitle">
<bitmap file="frames/indexboxtitle.png" />
<align>right</align>
<valign>top</valign>
<right rect="0,0,25,40" />
<middle rect="25,0,293,40" />
<left rect="318,0,30,40" />
</framedef>



Something like that would be really nice.

drahkar
November 1st, 2009, 11:54
Feris, try looking at the documentation on Panels. It might be exactly what you need to place this image.

https://www.fantasygrounds.com/refdoc/panel.xcp

I think you can meet your needs using that.