Implemented functions for scrollbar buttons

Also added some safety for the variable in 0x009DE54C.

Again, apologies for the weird pull request with an irrelevant commit in it that's not even mine, still slowly learning how to github. :) Will work in a separate branch next time.