games Open Menu Banner Image Scroll Pane

scroll pane slider custom built constructor function processing minimum maximum value width height basic functional

Scrapbook / Scroll Pane

A custom built slider. I did briefly look around for one already made, but I thought, ahh what the heck, I'll do my own.

The constructor takes several values:

<i>slider(boolean vertical, int x, int y, int width, int height, int minValue, int maxValue)</i>

First, is it a vertical slider or horizontal. The x, y position. The width and height, and the minimum and maximum value that it represents. In the Processing code a call to the slider's function update is required at each step to ensure its kept up-to-date with the latest mouse movements and can redraw at the right position.

Basic, but funtional. Oh, I drew the picture too... not that its of anything.

This is inevitably linked to my little space ship space battles project, you can see what else I've been working on by following the links below.

You need to have Java installed for this applet to work correctly.