Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 20, 2011, 12:42:28 PM (13 years ago)
Author:
landauf
Message:

more improvements for keyboard control of menus:

  • added setSelectionNear(r, c) function which tries to select the button closest to the given row/column
  • no initialization required anymore, the button-table grows dynamically if new buttons are inserted
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/data/gui/scripts/SheetManager.lua

    r7927 r7928  
    133133
    134134    -- select first button if the menu was opened with the keyboard
    135     if previous and previous.pressedEnter and menuSheet.buttons and menuSheet:hasSelection() == false then
    136         menuSheet:moveSelectionRow(1)
     135    if previous and previous.pressedEnter and menuSheet:hasSelection() == false then
     136        menuSheet:setSelectionNear(1, 1)
    137137    end
    138138
Note: See TracChangeset for help on using the changeset viewer.