Scroll component does not scroll properly
SaadArdati opened this issue ยท 1 comments
`int width = 210, height = 225;
ComponentVoid parent = new ComponentVoid(20, 10, width, height);
ComponentScrolledView scrolledView = new ComponentScrolledView(0, 0, width, height);
parent.add(scrolledView);
ComponentSpriteCapped scrollGrooves = new ComponentSpriteCapped(SCROLL_GROOVE_VERTICAL_TOP, SCROLL_GROOVE_VERTICAL_MIDDLE, SCROLL_GROOVE_VERTICAL_BOTTOM, false, width, 0, 12, height);
parent.add(scrollGrooves);
ComponentSlider scrollSlider = new ComponentSlider(6, SCROLL_SLIDER_VERTICAL.getHeight() / 2, 0, height - SCROLL_SLIDER_VERTICAL.getHeight(), 0, height);
scrollSlider.getHandle().add(new ComponentSprite(SCROLL_SLIDER_VERTICAL, -SCROLL_SLIDER_VERTICAL.getWidth() / 2, -SCROLL_SLIDER_VERTICAL.getHeight() / 2));
scrollSlider.getPercentageChange().add((p) -> scrolledView.scrollToPercent(new Vec2d(0, p)));
scrollGrooves.add(scrollSlider);
componnetPlate = new ComponentVoid(30, -20);
//scrolledView.add(componnetPlate);`
Scroll bar surprisingly appears with slider and scribbles. sliding slider doesn't scroll scribbles.