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); } }
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);
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); }
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); }
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; }