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/NotificationLayer.lua

    r7887 r7922  
    4646end
    4747
    48 -- Pushes an input notification to the input queue. 
     48-- Pushes an input notification to the input queue.
    4949function P.pushNotification(queueName, notification)
    5050    local queue = P.queueList[queueName]
     
    333333
    334334-- Is called after the sheet has been hidden.
    335 function P.afterHide()
     335function P.onAfterHide()
    336336    -- If we leave the edit mode we show the sheet again.
    337337    if P.editMode then
Note: See TracChangeset for help on using the changeset viewer.