Skip to content

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

@LuisMQuinones

Description

@LuisMQuinones

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

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

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions