DNH
November 30th, 2007, 15:03
I had thought I had read something about this somewhere on here before now, but I can't find it so here goes ...
My custom ruleset character sheet has a few entries which function as the indication of the modifier AND are grabbed to make dice rolls. To give one example, I have a weapons list which has an entry for weapon speed which is added to 1d10 to get the initiative (this is 2e, ok). So the player will grab at the "+5" or whatever, it becomes a d10 as he or she drags it and dropping it rolls 1d10+5. This is not the problem; this part all works fine.
What I would like to do is to be able to protect the field from inadvertent modification. I can quite easily see players inadvertently nudging the mousewheel up a notch or two and ending up with a higher initiative score than they should.
I do not want to make these fields "read only" as they will have to be altered at some point. I have already included the <noreset /> tag to prevent resetting to zero, but I would like to be able to prevent all editing but keying in of values. Is this possible? (It looks as though the opposite is possible, through use of <nokeyedit />.)
The only solution I can think of is to use the onValueChanged() function to throw up an alert message of sorts but a) I am not sure about how to do that (display an alert message box, I mean), and b) this is not particularly elegant.
Any thoughts?
My custom ruleset character sheet has a few entries which function as the indication of the modifier AND are grabbed to make dice rolls. To give one example, I have a weapons list which has an entry for weapon speed which is added to 1d10 to get the initiative (this is 2e, ok). So the player will grab at the "+5" or whatever, it becomes a d10 as he or she drags it and dropping it rolls 1d10+5. This is not the problem; this part all works fine.
What I would like to do is to be able to protect the field from inadvertent modification. I can quite easily see players inadvertently nudging the mousewheel up a notch or two and ending up with a higher initiative score than they should.
I do not want to make these fields "read only" as they will have to be altered at some point. I have already included the <noreset /> tag to prevent resetting to zero, but I would like to be able to prevent all editing but keying in of values. Is this possible? (It looks as though the opposite is possible, through use of <nokeyedit />.)
The only solution I can think of is to use the onValueChanged() function to throw up an alert message of sorts but a) I am not sure about how to do that (display an alert message box, I mean), and b) this is not particularly elegant.
Any thoughts?