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

    r7689 r8079  
    44P.loadAlong = { "ControlsMenu", "AudioMenu", "GraphicsMenu" }
    55
    6 P.buttonList = {}
    7 
    86function P.onLoad()
    97    --"Gameplay" and "Multiplayer Options" are not integrated in the list
    10     --buttons are arranged in a 4x2 matrix. The lower-right element is not in the matrix!
    11     local item = {
     8    --buttons are arranged in a 4x2 matrix.
     9    P:setButton(1, 2, {
    1210            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/GraphicsButton"),
    13             ["function"]  = P.SettingsGraphicsButton_clicked
    14     }
    15     P.buttonList[2] = item
     11            ["callback"]  = P.SettingsGraphicsButton_clicked
     12    })
    1613
    17     local item = {
     14    P:setButton(2, 2, {
    1815            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/AudioButton"),
    19             ["function"]  = P.SettingsAudioButton_clicked
    20     }
    21     P.buttonList[4] = item
     16            ["callback"]  = P.SettingsAudioButton_clicked
     17    })
    2218
     19    P:setButton(3, 1, {
     20            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),
     21            ["callback"]  = P.SettingsControlsButton_clicked
     22    })
    2323
    24     local item = {
    25             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),
    26             ["function"]  = P.SettingsControlsButton_clicked
    27     }
    28     P.buttonList[5] = item
     24    P:setButton(3, 2, {
     25            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),
     26            ["callback"]  = P.SettingsMiscellaneousButton_clicked
     27    })
    2928
    30     local item = {
    31             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),
    32             ["function"]  = P.SettingsMiscellaneousButton_clicked
    33     }
    34     P.buttonList[6] = item
     29    P:setButton(4, 1, {
     30            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),
     31            ["callback"]  = P.SettingsBackButton_clicked
     32    })
    3533
    36     local item = {
    37             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),
    38             ["function"]  = P.SettingsBackButton_clicked
    39     }
    40     P.buttonList[7] = item
    41 
    42 end
    43 
    44 function P.onShow()
    45     --indices to iterate through buttonlist
    46     P.oldindex = 3
    47     P.index = 2
     34    P:setButton(4, 2, P:getButton(4, 1))
    4835end
    4936
     
    7663end
    7764
    78 function P.onKeyPressed()
    79     buttonIteratorHelper(P.buttonList, code, P, 4, 2)
    80 end
    81 
    8265return P
    8366
Note: See TracChangeset for help on using the changeset viewer.