Rotary (incremental) Encoder Controlled Menu

I found this code on this website Tutorial: manage menu and LCD display with Arduino – Coagula – Giuseppe Di Cillo
it works great as menu with button control.
Does anyone know how to convert the button control to encoder control?