codingjoe / codingjoe/MusicBeam

The effect's list needs a scroll so more effects can be added (w/ suggestion code)

Open
#58 6 comments 0 reactions 2 assignees Claimed by @LuisMQuinones View on GitHub
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:

![screen shot 2018-05-15 at 7 01 37 pm](https://user-images.githubusercontent.com/14282382/40087878-8a87f552-5872-11e8-869b-3f3b5279b2d8.png)

```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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.