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

    r7876 r8079  
    33local P = createMenuSheet("SingleplayerMenu")
    44
    5 P.buttonList = {}
    65P.levelList = {}
    76P.itemList = {}
     
    1514
    1615    --buttons are arranged in a 1x2 matrix
    17     local item = {
     16    P:setButton(1, 1, {
    1817            ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"),
    19             ["function"]  = P.SingleplayerStartButton_clicked
    20     }
    21     P.buttonList[1] = item
     18            ["callback"]  = P.SingleplayerStartButton_clicked
     19    })
    2220
    23     local item = {
     21    P:setButton(1, 2, {
    2422            ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"),
    25             ["function"]  = P.SingleplayerBackButton_clicked
    26     }
    27     P.buttonList[2] = item
     23            ["callback"]  = P.SingleplayerBackButton_clicked
     24    })
     25end
     26
     27function P.onShow()
     28    if P.showAll ~= orxonox.GUIManager:inDevMode() then
     29        local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox")
     30        local button = tolua.cast(window,"CEGUI::Checkbox")
     31        P.showAll = not P.showAll
     32        button:setSelected(P.showAll)
     33        P.createLevelList()
     34    end
    2835end
    2936
     
    4754        index = index + 1
    4855    end
    49     --TODO: Reintroduce sorting, if needed. At the moment it's sorted by filename.
    50     --table.sort(levelList)
    5156    for k,v in pairs(P.levelList) do
    5257        local item = CEGUI.createListboxTextItem(v:getName())
     
    5964        orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription())
    6065    end
    61 end
    62 
    63 function P.onShow()
    64     --indices to iterate through buttonlist
    65     P.oldindex = -2
    66     P.index = -1
    6766end
    6867
     
    9392end
    9493
    95 function P.onKeyPressed()
    96     buttonIteratorHelper(P.buttonList, code, P, 1, 2)
    97 end
    98 
    9994return P
    10095
Note: See TracChangeset for help on using the changeset viewer.