PDA

View Full Version : GUI element reuse via templates



phantomwhale
August 19th, 2010, 14:00
Hi,

I'm trying to create a small, reusable GUI element across mutliple "sheetdata" areas.

More concrete example; in the 4E ruleset, the character sheet has the same name and race block across the top of most of the sheets. I notice in the ruleset, this is simply copy and pasted into each charactersheet_xyz.xml file, but wondered if there was a way of making something like this reusable, perhaps through the use of templates ?

I am looking at a frame, with several associated controls within it, so be positioned at the top of my character sheet, and this is coming to almost 800 lines of XML, which I am less than keen to copy and paste over 7 files at the moment. Especially when I keep tweaking the controls every few minutes :)

Thanks for you help / advice / ideas,
Ben

Moon Wizard
August 19th, 2010, 17:23
The way to do it is to shift the subwindows section down in the top level of the character sheet, then place your controls in the top level sheet. Then you are only managing in one location. The only reason I didn't do this for the 4E ruleset is that I wanted the top frame on the Notes page to be a different size than on the other pages.

Currently, there are no features to define template "groups".

Cheers,
JPG

phantomwhale
September 7th, 2010, 00:13
Finally got around to trying this out tonight - thanks, it worked a charm. Got a better understanding of subwindows too :)