示例#1
0
        public InputField RegisterIntInput(string inputName, string toolParamName, Interval1i validRange)
        {
            InputField input = UnityUIUtil.FindInputAndAddIntHandlers(this.gameObject, inputName,
                                                                      () => { return(ActiveParameterSet.GetValueInt(toolParamName)); },
                                                                      (intValue) => { ActiveParameterSet.SetValue <int>(toolParamName, intValue); update_values_from_tool(); },
                                                                      validRange.a, validRange.b);

            TabOrder.Add(input);

            int_params.Add(new IntInputParam()
            {
                widget = input, paramName = toolParamName
            });

            return(input);
        }