-
April 8th, 2008, 19:20 #1
Referencing an image to a genericcontrol
Noob alert!
Im trying to add an "image" of a figure to the armour sheet/section of the character sheet Im building.
Ive looked at how the acicon was added to the combat sheet of the D20 ruleset, but from what I can tell, it was referenced to the output field which inturn was referenced to the generic control.
I want to reference the image to the generic control, and then reference my numberfields (output fields) etc to the image. I have added the image to the graphicframes.xml, and given it a frame definition.
Its pretty clear Im a total noob at this, but would appreciate any assistance.
Hope this is clear enough. Thanks in advance Baz.
-
April 9th, 2008, 06:09 #2
The genericcontrol has a <frame> element, which should be set to the new image. For example, if your image was 100x200 and called frames\myimage.png, and you had a line in graphic_frames.xml:
Code:<framedef name="myimage"> <bitmap file="frames/myimage.png" /> <middle rect="0,0,100,200" /> </framedef>
Code:<genericcontrol> <anchored> ... some anchoring ... <size> <width>100</width> <height>200</height> </size> </anchored> <frame>myimage</frame> </genericcontrol>
The genericcontrol then has the same size as the image.
Hope that helps
Stuart
-
April 9th, 2008, 09:12 #3
Thanks Foen,
It was the whole... adding another genericcontrol thing that threw me, plus the fact I didnt have to reference it to the first "sheetgroup" genericcontrol.
Works like a charm.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks