PDA

View Full Version : Buttons on Custom Character Sheets



lericson
March 12th, 2008, 22:11
I am try to figure out how to add a simple on/off button on a custom character sheet (that is recorded when the character sheet is closed). I've been using the generic character sheet created by Toadwart as a starting point.

I'm a novice at XML, so after tinker around with some pieces of code from other rulesets and getting nowehere, I thought I'd ask the collective wisdom of the FG community.

Any help would be appreciated.

MadJack
March 13th, 2008, 18:12
For the world of darkness one I am working on I just copied the checkbox template in common_templates.xml and the template_checkbox.lua script and made modifications to do the circles. Here is the template I did:


<template name="checkcircle">
<genericcontrol>
<stateicons>
<on>indicator_circleon</on>
<off>indicator_circleoff</off>
</stateicons>
<script file="scripts/template_checkcircle.lua" />
</genericcontrol>
</template>


The state icons need to be added to the graphics.xml file like so:


<icon name="indicator_circleon" file="icons/indicator_circleon.png" />
<icon name="indicator_circleoff" file="icons/indicator_circleoff.png" />


And the script for the template is pretty much just a copy of the template_checkbox.lua renamed. They function identically right now but I wanted to have different functions for them in case I needed to make any changes to them.

If you have any questions about this throw it in here. I am sure someone can help. :D