codingjoe / codingjoe/MusicBeam
The effect's list needs a scroll so more effects can be added (w/ suggestion code)
- Dominant language
- Processing
- Stars
- 294
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
We can't add any new effects to the Effect effectsArray, or better; anymore toggles to RadioButton activeEffect, because the additional toggles are rendered off screen.
I looked for ways to wrap the activeEffect into one of the scroll controllers like ListBox or ScrollableList.
I think we may need to drop RadioButton activeEffect in favor of a ScrollableList with no visible bar.
I wrote some short code to test it out:

```Java
cp5 = new ControlP5(this);
scroll = cp5.addScrollableList("scroll")
.setType(ScrollableList.LIST)
.setBarHeight(0)
.setSize(150,150)
.setItemHeight(20)
.setBarVisible(false)
.setPosition(width/2-75,height/2-75) ;
```
```Java
void scroll(int i){
//println(i, cp5.get(ScrollableList.class, "scroll").getItem(i));
Effect effect = (Effect)cp5.get(ScrollableList.class, "scroll").getItem(i).get("value");
println("id",effect.val,"name",effect.name,"was chosen");
}
```
I think it looks like the original implementation with an added scrollbar.
@codingjoe I'll love to hear what you think.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.