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

    r7877 r8079  
    44P.loadAlong = { "DecisionPopup" }
    55
    6 P.buttonList = {}
    7 
    86function P.onLoad()
    9     P.multiplayerMode = "startClient" 
     7    P.multiplayerMode = "startClient"
    108
    119    --button are arranged in a 4x1 matrix, the left lower item is nil
    12     local item = {
     10    P:setButton(1, 1, {
    1311            ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReturnButton"),
    14             ["function"]  = P.button_settings_clicked
    15     }
    16     P.buttonList[1] = item
     12            ["callback"]  = P.button_return_clicked
     13    })
    1714
    18     local item = {
     15    P:setButton(2, 1, {
    1916            ["button"] = winMgr:getWindow("orxonox/InGameMenu_MainMenuButton"),
    20             ["function"]  = P.button_mainmenu_clicked
    21     }
    22     P.buttonList[2] = item
     17            ["callback"]  = P.button_mainmenu_clicked
     18    })
    2319
    24     local item = {
     20    P:setButton(3, 1, {
    2521            ["button"] = winMgr:getWindow("orxonox/InGameMenu_SettingsButton"),
    26             ["function"]  = P.button_settings_clicked
    27     }
    28     P.buttonList[3] = item
     22            ["callback"]  = P.button_settings_clicked
     23    })
    2924
    30     local item = {
     25    P:setButton(4, 1, {
    3126            ["button"] = winMgr:getWindow("orxonox/InGameMenu_QuitButton"),
    32             ["function"]  = P.button_quit_clicked
    33     }
    34     P.buttonList[4] = item
    35 
     27            ["callback"]  = P.button_quit_clicked
     28    })
    3629end
    3730
    3831function P.onShow()
    39     --indices to iterate through buttonlist
    40     P.oldindex = -2
    41     P.index = -1
     32    if P:hasSelection() == false then
     33        P:setSelection(1, 1)
     34    end
     35
     36    orxonox.execute("setPause 1")
     37end
     38
     39function P.onQuit()
     40    orxonox.execute("setPause 0")
    4241end
    4342
     
    6463        hideMenuSheet("InGameMenu")
    6564        orxonox.execute("exit")
    66     else 
     65    else
    6766        P.onShow()
    6867    end
    6968end
    7069
    71 function P.onKeyPressed()
    72     buttonIteratorHelper(P.buttonList, code, P, 4, 1)
    73 end
    74 
    7570return P
    7671
Note: See TracChangeset for help on using the changeset viewer.