So for a re-usable class with a scroll bar in it I have two integers, I have height, that's the vertical length of the scroll bar, and position, that's the position of the scrolly peggy peg.
so for now I just want to output the percentage on the console, so if the peg is half way down the bar then I want to put something like
output(h%(position*100));
and I get 50 for example, every time the peg is half way down the bar, no matter what the h is!
something like that, but its one of those mornings where I cant get my maths around my head
oh yeah almost works :) now I need to get that against the total text height in the buffer, can you help here too? been experimenting, just not surewhat I am doing
yep :) like a dream, I made all the bits and decided to deal with the numbers later, popped in the maths and boom works, im annoyed I just get a headache when I have to think 2 moves ahead, could be all that lead shot I used to eat