PDA

View Full Version : Number control questions



KyleC
December 21st, 2005, 15:18
I have a couple of questions:

1. Is there a way to cause a numbercontrol to display the lesser of two numbers? The numbers I would be evaluating are in other numbercontrols.

2. Is there a property which will set a numbercontrol to be uneditable by the player? I'd still like for them to be able to drag the number, just not edit it.

Thanks for the help,
-KyleC

Goblin-King
December 21st, 2005, 17:27
1. Is there a way to cause a numbercontrol to display the lesser of two numbers? The numbers I would be evaluating are in other numbercontrols.
You need to use some tricks if you want to try something like this. See this thread for some clever ideas:

https://www.fantasygrounds.com/forums/showthread.php?t=3715


2. Is there a property which will set a numbercontrol to be uneditable by the player? I'd still like for them to be able to drag the number, just not edit it.
If you just want the number to sit there, you can use this in a numbercontrol:


<value type="readonly">
If you want to modify it yourself but not allow the player to do that on a character sheet or such, I'm afraid that won't be possible until the scripting patch that will allow you to do stuff differently in logic based on a flag such as whether the active user is the GM or not.

KyleC
January 2nd, 2006, 22:29
Thanks for the help!

-KyleC

Bumamgar
January 3rd, 2006, 19:19
I'd be interested in a way to make a number control semi-read only. It can be set via drag-n-drop, but not edited by typing or moving the mousewheel over the control.

This would come in handy on the spell-list for example. The list is able to be populated via drag-n-drop from the spell tables, and name, level, description are auto-filled in. However, since level is a number control, if you happen to have your mouse pointer near it when trying to use your mousewheel to scroll the list of spells, you end up changing the level of the spell instead of scrolling the list. Since the list is autosort by level, you actually often end up changing the level of many spells all at once, as the spell under the cursor moves to a new spot on the list and then the scroll affects the new spell under the cursor...

Anyway, what I am getting at is that it would be nice to have certain fields un-"editable" but still capable of being populated via a drag-n-drop operation. Maybe 1.06 with LUA will enable this somehow :)