Scroll menu issues

How does one go about coding such a structure, I have an example however I’m not sure how to apply masks. The issue is that every list item has a particular height, and position, the scroll bar amends their position and if its current position is within the display window then it is drawn.


Screen Shot 03-10-20 at 01.46 PM 001

But here is what happens when the items position is higher than the viewing window. As its not drawn we have a blank. I do understand I could use a rectangle to mask everything that’s above but then this will cause problems with other gui elements as these are floating windows and would be expected to be drawn above everything else.

Any input would be great thanks.


there is unfortunately no code with this as it is a pretty big project.

1 Like

Don’t use a mask maybe

Instead the scroll bar tells the for loop where to start

for(int i=valueFromScrollbar;i<valueFromScrollbar+20;i++){

Thus he draws only certain lines

The scrolling is line by line not by pixel

Some other options include:

1 Like

Thanks but I wanted to use my own code, Ive solved this using scale.

1 Like