CMenu pseudo code - OOP344 20113

From CDOT Wiki
Revision as of 23:25, 29 November 2011 by Fardad (talk | contribs) (Created page with '<big><pre> LOOP UNTIL editing is done Draw the Menu -- EDITING THE TITLE OF THE MENU --: IF object is dropdown and it is not dropped THEN Edit The Title Button IF …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
LOOP UNTIL editing is done
  Draw the Menu
/*-- EDITING THE TITLE OF THE MENU --*/
  IF object is dropdown and it is not dropped THEN
    Edit The Title Button
    IF Button is hit THEN
      Set the menu to drop down when drawn
      draw the menu
      Set Menu browsing Loop to start
    ELSE
      Set Menu browsing Loop NOT to start
    END IF
  END IF
  Set editing loop to end.
/*-- BROWSING THE MENUITEMS IN MNEU --*/
  LOOP UNTIL menu browsing is done
    Edit the current menu item and get the key returned
    IF the key is ENTER
      IF any of items are selected THEN
        change the key value o SPACE
      END IF
      set the browsing loop to end
    END IF
    IF the key is SPACE THEN
      set the selected index
      set the browsing loop to end
    END IF
    /* to be continued */
  End menu browsing loop
End Editing loop