https://editor.p5js.org/7vector/full/NlnUSedYI (the new game I’m working on) is currently down because I accidentally broke it, I’ll fix it when I get home (doesn’t work on mobile)
https://editor.p5js.org/7vector/sketches/7DXk4U_iW I have updated my button system, IT HAS SLIDERS NOW!!!!! Gonna make dials next
(info on how to use both sliders and buttons in comments)
info about sliders:
new slider(
type ("button" or "box", defaults to box),
vertical (bool, horizontal if false),
x, y)
Slength = number, the length of the slider, (x,y) is the bottom or leftmost point
smooth = bool, whether the slider is smooth or segmented
segments = int, how many segments the slider can go between, evenly divided
functions:
render()
what the slider looks like. comes with a default, but can be overridden
check()
the logic of the slider, can be overridden, but not recommended
! TYPO: “button” should be “circle”
also this inherits everything from button, except check and render are different by default
output values:
inherits from button
value
if segmented is true, returns amount of segments it has passed, starting at 0
if segmented is false, returns how many pixels it is from the origin