Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2011, 9:09:58 PM (13 years ago)
Author:
dafrick
Message:

Reverting changes made in revision 8035, that based the menu navigation on console commands, due to implemential difficulties of the hacks to make menu navigation work fully.
So, at the moment, we'll have to make due with the old version of the menu navigation implementation.

File:
1 edited

Legend:

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

    r8035 r8078  
    2929
    3030-- Override this function if you want to react on keystrokes
    31 function P:onKeyPressed(mode)
     31function P:onKeyPressed()
    3232end
    3333
     
    8585
    8686-- Handles key pressed while the gui sheed is displayed
    87 function P:keyPressed(mode)
     87function P:keyPressed()
    8888    if self.buttons then
    89         if mode == "down" then     -- key down
     89        if code == "208" then     -- key down
    9090            self:moveSelectionRow(1)
    91         elseif mode == "up" then -- key up
     91        elseif code == "200" then -- key up
    9292            self:moveSelectionRow(-1)
    93         elseif mode == "right" then -- key right
     93        elseif code == "205" then -- key right
    9494            self:moveSelectionColumn(1)
    95         elseif mode == "left" then -- key left
     95        elseif code == "203" then -- key left
    9696            self:moveSelectionColumn(-1)
    97         elseif mode == "enter" then -- key enter or key numpad enter
     97        elseif code == "28" or code == "156" then -- key enter or key numpad enter
    9898            self:pressSelectedButton()
    9999        end
    100100    end
    101101
    102     self:onKeyPressed(mode)
     102    self:onKeyPressed()
    103103end
    104104
Note: See TracChangeset for help on using the changeset viewer.