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

    r7887 r8079  
    55P.multiplayerMode = "startServer"
    66
    7 P.buttonList = {}
    87P.levelList = {}
    98P.itemList = {}
     
    1110
    1211function P.onLoad()
    13     P.multiplayerMode = "startServer" 
     12    P.multiplayerMode = "startServer"
    1413    local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
    1514    local button = tolua.cast(window,"CEGUI::Checkbox")
     
    1716    P.createLevelList()
    1817
    19     local item = {
     18    P:setButton(1, 1, {
    2019            ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"),
    21             ["function"]  = P.HostMenuStartButton_clicked
    22     }
    23     P.buttonList[1] = item
     20            ["callback"]  = P.HostMenuStartButton_clicked
     21    })
    2422
    25     local item = {
     23    P:setButton(1, 2, {
    2624            ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"),
    27             ["function"]  = P.HostMenuBackButton_clicked
    28     }
    29     P.buttonList[2] = item
     25            ["callback"]  = P.HostMenuBackButton_clicked
     26    })
    3027end
    3128
    3229function P.onShow()
     30    if P.showAll ~= orxonox.GUIManager:inDevMode() then
     31        local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
     32        local button = tolua.cast(window,"CEGUI::Checkbox")
     33        P.showAll = not P.showAll
     34        button:setSelected(P.showAll)
     35    end
     36
    3337    if P.multiplayerMode == "startServer" then
    3438        local window = winMgr:getWindow("orxonox/HostMenuHostButton")
     
    4448        P.createLevelList()
    4549    end
    46 
    47     P.oldindex = -2
    48     P.index = -1
    49 
    5050end
    5151
     
    9797end
    9898
    99 function P.HostMenuStartButton_clicked(e)   
     99function P.HostMenuStartButton_clicked(e)
    100100    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox"))
    101101    local choice = listbox:getFirstSelectedItem()
     
    119119end
    120120
    121 function P.onKeyPressed()
    122     buttonIteratorHelper(P.buttonList, code, P, 1, 2)
    123 end
    124 
    125121return P
Note: See TracChangeset for help on using the changeset viewer.