fixed some stuff with input

it's still broken though, the problem is something to do with (* buttons)[id].prevState = state
I think the vector might not be initialized?