Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 20, 2011, 12:47:57 AM (13 years ago)
Author:
landauf
Message:

implemented new keyboard control of menu buttons with these new features:

  • more intuitive placement of buttons in table (row/column format instead of linear index)
  • no need to overwrite onShow() and onKeyPressed() functions, no need for P.buttonList
  • highlights the selected button in a different layout than mouse hovering
  • remembers the selection while moving through the menu hierarchy, but resets it if the menu is closed
  • allows preselected button (for example "Yes" in decision popup)
  • when opening a menu, the first selected button is not always the upper left, but instead depends on the pressed key (e.g. the 'up' key selects the button at the bottom, while the 'down' key selects the button at the top. once a button is selected, the keys behave as usual)

+ fixed wrong callback function in ingame menu

File:
1 edited

Legend:

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

    r7689 r7922  
    126126        end
    127127    end
    128    
     128
    129129    menuSheet:show()
    130130    menuSheetsRoot:activate()
     
    179179        inputMgr:leaveState(sheetTuple.sheet.inputState)
    180180    end
    181    
     181
    182182    -- CURSOR SHOWING
    183183    local i = activeMenuSheets.size
     
    245245        end
    246246    end
    247     sheet.sheet:onKeyPressed()
     247    sheet.sheet:keyPressed()
    248248end
    249249
Note: See TracChangeset for help on using the changeset viewer.