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

Wrong label position on vertical slider if aligned to BOTTOM_OUTSIDE #158

Open
JKFennis opened this issue Oct 16, 2019 · 0 comments
Open

Comments

@JKFennis
Copy link

int sliderHeight = 200;
// add a vertical slider
cp5.addSlider("slider")
.setPosition(100,305)
.setSize(20,sliderHeight)
.setRange(0,200)
.setValue(128)
;

// reposition the Label for controller 'slider'
cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE);

Adding a vertical padding the length of slider seems to work as workaround:
cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE).setPaddingY(-sliderHeight);

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