PDA

View Full Version : Buttoncontrol ?s and Savageworlds Ruleset



Mgrancey
March 5th, 2014, 17:24
Because I know some stuff is different, does buttoncontrol work as per described in library?

I saw that there buttoncontrols can have multiple states, how does one create and identify them? I know that there is a child tag <state>, but how do you setup a 0, 1, 2, state? I am attempting to set it up that it will be unselected (0); first value (1); 2nd value (2), back to unselected (0), but I'm not sure on how to set each state, unless I am misunderstanding the mutliple states. Do I just create three with one normal, and two ones for pressed with them displaying different text?

Is special coding needed for <windowlist> to accept items from a datasource, such as skills, weapons, edges, hindrances, when taken from a module but applied by the structure from the rules set. The standard power windowclass doesn't really handle the Super Power format very well, so I am altering the power windowclass to work better for it, and I am going to create a list of buttoncontrol entries for the modifiers for powers, so that if a character's power has some selected it will be tracked with the character.

Moon Wizard
March 5th, 2014, 23:30
Multiple states in buttoncontrols are defined using <state> tags. The first state tag always has a value of 0, and increases by 1 for every state tag. The number of states also determines the maximum value of the button, and when the button value wraps around back to zero. Each state can have a normal, pressed and hover graphic for the button. Several of the rulesets, including CoreRPG, now use buttoncontrols. (They basically replace the old button_iconcycler template.)

There are a couple primary ways for a windowlist control to accept shortcuts:
* Add an onDrop event handler, check to see if the dragdata object passed as an input parameter to this event is a shortcut with a class you want to accept, perform any script code you want, and return true to let FG know this drop has been handled.
* Add an acceptdrop tag with one or more class and field tags. There must be at least one tag of each type defined. To copy all fields use <field>*</field>. Then, the windowlist control will copy the defined fields (or all fields with * specified) of any shortcut link dropped on the windowlist which matches one of the class tags.

Regards,
JPG