Resource Old School Scroll Bar Util

Just a small resource i made to handle the scroll bars in old school. Currently it has the chatbox (not tested) and the emotes tab built in to use but it should be easy enough to implement other scroll bars and if you post them below ill add them.

Features:
- get the current scroll of scroll bars
- get the scroll required to make components visible
- scroll to a component or float value
- check if a component is visible in the content box

To make a new scroll bar which hasn't been implemented you just need to get the scroll box, scroll bar, content box and a list of the components in the content box.

scroll box = The box in which the bit you drag to scroll is located. This should not contain the arrows.scroll bar = The thing you click and drag to scroll up/downcontent box = The box where the content components are visiblecontent = A list of all the components in the content box. (eg. the emote components for the emotes scroll bar)

then you just use ScrollBar#getScrollBar(scrollBox, scrollBar, contentBox, content); to get the ScrollBar object for that scroll bar.

What should be used instead? I dont really see any other way to do it except for using bounding box size or texture id which seems even more hacky to me.

Click to expand...

You can use either of those, it's not about it being "hacky" it's about it being dynamic enough that Jagex couldn't break the recognition without changing something that an actual user would notice too.

You can use either of those, it's not about it being "hacky" it's about it being dynamic enough that Jagex couldn't break the recognition without changing something that an actual user would notice too.