How could I make a discrete-distribution input element?

Thanks, Tom. I wanted to take a closer look.