Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2011, 9:47:11 PM (13 years ago)
Author:
landauf
Message:

merged usability branch back to trunk

incomplete summary of the changes in this branch:

  • enhanced keyboard navigation in GUIs
  • implemented new graphics menu and changeable window size at runtime
  • added developer mode
  • HUD shows if game is paused, game pauses if ingame menu is opened
  • removed a few obsolete commands and hid some that are more for internal use
  • numpad works in console and gui
  • faster loading of level info
  • enhanced usage of compositors (Shader class)
  • improved camera handling, configurable FOV and aspect ratio
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/gui/scripts/MainMenu.lua

    r7689 r8079  
    44P.loadAlong = { "SingleplayerMenu", "MultiplayerMenu", "SettingsMenu", "CreditsMenu" }
    55
    6 P.buttonList = {}
    7 
    86function P.onLoad()
    97    --buttons are arranged in a 6x1 Matrix (list)
    10     local item = {
     8    P:setButton(1, 1, {
    119            ["button"] = winMgr:getWindow("orxonox/QuickGameTestButton"),
    12             ["function"]  = P.QuickGameTestButton_clicked
    13     }
    14     table.insert(P.buttonList,item)
     10            ["callback"]  = P.QuickGameTestButton_clicked
     11    })
    1512
    16     item = {
     13    P:setButton(2, 1, {
    1714            ["button"] = winMgr:getWindow("orxonox/SingleplayerButton"),
    18             ["function"]  = P.SingleplayerButton_clicked
    19     }
    20     table.insert(P.buttonList,item)
     15            ["callback"]  = P.SingleplayerButton_clicked
     16    })
    2117
    22     item = {
     18    P:setButton(3, 1, {
    2319            ["button"] = winMgr:getWindow("orxonox/MultiplayerButton"),
    24             ["function"]  = P.MultiplayerButton_clicked
    25     }
    26     table.insert(P.buttonList,item)
     20            ["callback"]  = P.MultiplayerButton_clicked
     21    })
    2722
    28     item = {
     23    P:setButton(4, 1, {
    2924            ["button"] = winMgr:getWindow("orxonox/SettingsButton"),
    30             ["function"]  = P.SettingsButton_clicked
    31     }
    32     table.insert(P.buttonList,item)
     25            ["callback"]  = P.SettingsButton_clicked
     26    })
    3327
    34     item = {
     28    P:setButton(5, 1, {
    3529            ["button"] = winMgr:getWindow("orxonox/CreditsButton"),
    36             ["function"]  = P.CreditsButton_clicked
    37     }
    38     table.insert(P.buttonList,item)
     30            ["callback"]  = P.CreditsButton_clicked
     31    })
    3932
    40     item = {
     33    P:setButton(6, 1, {
    4134            ["button"] = winMgr:getWindow("orxonox/ExitButton"),
    42             ["function"]  = P.ExitButton_clicked
    43     }
    44     table.insert(P.buttonList,item)
    45 end
    46 
    47 function P.onShow()
    48     --indices to iterate through buttonlist
    49     P.oldindex = -2
    50     P.index = -1
     35            ["callback"]  = P.ExitButton_clicked
     36    })
    5137end
    5238
     
    7763end
    7864
    79 function P.onKeyPressed()
    80     buttonIteratorHelper(P.buttonList, code, P, 6, 1)
    81 end
    82 
    8365return P
    8466
Note: See TracChangeset for help on using the changeset viewer.