Пример #1
0
 protected void CreateStorable(
     string name, string def, List <string> entries, List <string> tags,
     JSONStorableStringChooser.SetStringCallback callback)
 {
     if (tags == null)
     {
         storable_ = new JSONStorableStringChooser(
             name, entries, def, name, callback);
     }
     else
     {
         storable_ = new JSONStorableStringChooser(
             name, tags, entries, def, name, callback);
     }
 }
Пример #2
0
 public JSONStorableStringChooser CreateScrollablePopup(string paramName, string label, List <string> values, string startingValue, JSONStorableStringChooser.SetStringCallback callback, bool rightSide = false)
 => CreatePopup(paramName, label, values, startingValue, callback, true, rightSide);
Пример #3
0
        public JSONStorableStringChooser CreatePopup(string paramName, string label, List <string> values, string startingValue, JSONStorableStringChooser.SetStringCallback callback, bool scrollable, bool rightSide = false)
        {
            var storable = new JSONStorableStringChooser(paramName, values, startingValue, label, callback);

            if (!scrollable)
            {
                var popup = Plugin.CreatePopup(storable, rightSide);
                popup.labelWidth = 300;
            }
            else
            {
                var popup = Plugin.CreateScrollablePopup(storable, rightSide);
                popup.labelWidth = 300;
            }

            return(storable);
        }
Пример #4
0
        private void StringDropdown(ref JSONStorableStringChooser output, string name, string start, List <String> choices, JSONStorableStringChooser.SetStringCallback callback, bool rhs)
        {
            output = new JSONStorableStringChooser(name, choices, start, name, callback);

            RegisterStringChooser(output);
            CreateScrollablePopup(output, rhs);
        }
Пример #5
0
 public JSONStorableStringChooser CreatePopup(string paramName, string label, List<string> values, string startingValue, JSONStorableStringChooser.SetStringCallback callback, bool scrollable, bool rightSide = false)
 {
     var storable = _builder.CreatePopup(paramName, label, values, startingValue, callback, scrollable, rightSide);
     _objects.Add(storable);
     return storable;
 }