I've been using this same code for a few projects now to create a user interface using a single rotary encoder and a button to drive a menu on an LCD as well as the various user input functions. I got tired of moving the code from one project to another the hard way so I decided to condense it into a library. And in response to a few recent posts I thought I would share what I'm doing. It's called REBL_UI.
It currently uses a different LiquidCrystal library that uses a shift register to save pins on the Arduino and drives the LCD through a shift register on the SPI bus, but could easily be adapted to work with any of the existing flavors of LiquidCrystal with only a few lines of code needing to change. If you need help with modifications, ask here or on my github page.
The code can be found on my github page along with my LCD library. There is one simple example code included but for a bigger example see my Disco_Doser code on the same page.
I don't know if you'll find it useful or not, but it doesn't cost me anything to share it so here it is.