PDA

View Full Version : Single Images in Background?



steev42
September 6th, 2006, 20:07
I'm trying to make a new ruleset for my Shackled City campaign, and I'm trying to change the background. What I'd like to do is use the chain motif that exists in the hardcover (for those of you who know what that is). Is it possible to have images on the tabletop in addition to the background image? If so, could anyone help me out with the XML additions? Thanks.

A Trackless Stranger
September 6th, 2006, 20:14
This gives you an idea of how to change things. See if that helps...

https://www.fantasygrounds.com/forums/showthread.php?t=3113&highlight=desktop+image

steev42
September 6th, 2006, 22:00
Yeah, I got the tiling bit down no problem, thanks. I was more wondering if I could put another static image on the desktop as well.

A Trackless Stranger
September 6th, 2006, 22:34
Yeah, I got the tiling bit down no problem, thanks. I was more wondering if I could put another static image on the desktop as well.

Ah...sorry. I think the best way to go about that would probably be to incorporate the second image into the base image. At present, I don't think there is another way to accomplish that. I could be wrong though.

joshuha
September 6th, 2006, 22:38
Pretty sure this wouldnt be a problem. What I think you would have to do is make the static image an icon and then define that in the desktop.xml file. Look at the d20_desktop.xml file and note where it has the shortcuts (icons) for either the player view or dm view. The only thing is I don't think you would need a windowopen control since the icon is not opening another frame. Not sure what you would put there in its place.

steev42
September 9th, 2006, 04:20
Ok, I've done what I can. I've included in graphics.xml the following code:



<icon name="topchain" file="rulesets/.../chain_top.gif" />
<icon name="bottomchain" file="rulesets/...chain_bottom.gif" />
<icon name="midchain" file=rulesets/...chain_mid.gif" />

(I've replaced the long path with ... to facilitate non-scrolling code window)

And in desktop.xml the following code:


<windowclass name="chain">
<defaultsize width="368" height="665" />
<defaultposition x="400" y="65" />
<desktopwindow />
<staticgraphic>
<bounds rect="0,0,112,368" />
<icon name="topchain" />
</staticgraphic>
</windowclass>


Now, this has absolutely no effect that I can see. The only thing I can figure is that staticgraphic isn't the right control, but I have no clue what could be. So if anyone has a list of controls that might be useful?

Toadwart
September 10th, 2006, 21:28
Not sure why that wouldn't work. Try using a frame rather than an icon:




<windowclass name="chain">
<defaultsize width="368" height="665" />
<defaultposition x="400" y="65" />
<desktopwindow />
<staticgraphic>
<bounds rect="0,0,112,368" />
<frame name="topchain" />
</staticgraphic>
</windowclass>




which would also require defining it like this


<framedef name="topchain">
<bitmap file="rulesets\...\topchain.png" />
<topleft rect="0,0,0,0" />
<top rect="0,0,0,0" />
<topright rect="0,0,0,0" />
<left rect="0,0,0,0" />
<middle rect="0,0,368,665" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
</framedef>


Also be aware that (at least for me) these 'desktop' windows have a niggling bug:
If I right-click over a desktop window (including the standard buttons) the standard desktop radial menu appears but doesn't function (selecting a radial menu option just closes them, it doesn't perform the selected action)