Ulysses
General => Developers Corner => Topic started by: bender180 on May 12, 2013, 08:06:29 AM
-
is it possible to have a user be able to input an integer only when a certain string is selected? so say the string is slay is it possible to have a integer input feild enabled for the user to add a value but when any other string is selected the input field is disabled?
-
In ULX?
http://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.NumArg
As for determining it's optionality based on the previous input string, well, uh, I don't think so.
Megiddo and perhaps MrP/Stickly can weigh in on that.
-
Yes, command arguments are static. Creating an API for dynamic arguments as you're suggesting would be a nightmare... *shudder*
You can enforce the dynamic aspect yourself by always taking it as a string argument.