Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing ControlP5 Issue - no other term for it #180

Open
dnspikaia opened this issue Jan 11, 2023 · 0 comments
Open

Processing ControlP5 Issue - no other term for it #180

dnspikaia opened this issue Jan 11, 2023 · 0 comments

Comments

@dnspikaia
Copy link

Hi tried to change labels of cp5 sliders. Used the code by sojamo. Dragged and dropped the "reposition label" - code by sojamo into my code twice. One works, the other one doesn`t.
The slider is called properly - if I replace the .getCaption... -part with something like .setColor(..) it simply works.

I checked the whole program, all tabs, there is no other part in the code that anyhow interacts with the labels of the control panel. Anyone any idea what might be wrong???
(sorry for the freaky names, its for german speaking people)

// sliders
cp5.addSlider("Wand_Breite")
.setPosition(180, 165)
.setWidth(200)
.setColorActive(color(55))
.setColorForeground(color(100))
.setColorBackground(color(155))
.setRange(1, 10)
.setValue(1)
.setNumberOfTickMarks(10)
.setSliderMode(Slider.FLEXIBLE);

// reposition the Label for controller 'Wand_Breite'
// This part works
cp5.getController("Wand_Breite").getValueLabel()
  .align(ControlP5.LEFT, ControlP5.TOP_OUTSIDE).setPaddingX(0);
cp5.getController("Wand_Breite").getCaptionLabel()
  .align(ControlP5.RIGHT, ControlP5.TOP_OUTSIDE).setPaddingX(0);

cp5.addSlider("Aktive_Wand")
  .setPosition(180, 210)
  .setWidth(200)
  .setColorActive(color(55))
  .setColorForeground(color(100))
  .setColorBackground(color(155))
  .setRange(0, 1)
  .setValue(0)
  .setNumberOfTickMarks(2)
  .setSliderMode(Slider.FLEXIBLE);

// reposition the Label for controller 'Aktive_Wand'
// This does not. ..? ....????!!!!!
cp5.getController("Aktive_Wand").getValueLabel()
  .align(ControlP5.RIGHT, ControlP5.BOTTOM_OUTSIDE).setPaddingX(0);
cp5.getController("Aktive_Wand").getCaptionLabel()
  .align(ControlP5.RIGHT, ControlP5.BOTTOM_OUTSIDE).setPaddingX(0);

Ohne Titel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant