Programming keyboard menu

Hi,
Is there any good tutorial/guidelines to create games menu driven by keyboard only?

The kind of menu one can see in every games:

  • you browse the item with your arrow keys
  • by doing so, the element get highligthed (a different graphic)
  • if you press a button (i.e the spacebar) the element get selected (another different graphic)
  • very important: when you call the menu again, your last selected options are memorized…so each element is set to the proper state (selected or not actually)

So that would need:

  1. a “map” with all your elements
  2. a procedure to hilight the current element
  3. saving settings and being able to recall them…and put each button in the correct state (even after a restart)

Thanks very much for any kind help

PS: I would even be able to pay for any good script;-)