Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8977 for code/branches


Ignore:
Timestamp:
Dec 14, 2011, 2:12:11 PM (13 years ago)
Author:
smerkli
Message:

Merged menue

Location:
code/branches/presentation2011
Files:
55 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2011

  • code/branches/presentation2011/data/gui/layouts/CreditsMenu.layout

    r8888 r8977  
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    88        <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsWindow" >
    9             <Property Name="Text" Value="Keybindings" />
     9            <Property Name="Text" Value="Credits" />
    1010            <Property Name="Alpha" Value="0.8" />
    1111            <Property Name="InheritsAlpha" Value="False" />
     
    1515            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" />
    1616            <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsMenuWrapper" >
    17                 <Property Name="TextColours" Value="FF4444FF" />
    1817                <Property Name="InheritsAlpha" Value="False" />
    1918                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2726                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2827                    <Property Name="HorzOverlapSize" Value="0.01" />
    29                     <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" />
     28                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.997,0},{0.997,0}}" />
    3029                    <Property Name="VertOverlapSize" Value="0.01" />
    3130                    <Property Name="HorzScrollPosition" Value="0" />
     
    3837                        <Property Name="VertFormatting" Value="TopAligned" />
    3938                        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    40                         <Property Name="Text">wird sowieso nicht gelesen
    41 Orxonox version 0.0.3
    42 
    43 Programming Language:  C++ - lua - tcl
    44 Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE
    45 Licence:  GNU General Public Licence - Creative Commons
    46 
    47 das ist mein text höhö
    48 
    49 http://www.orxonox.net
     39                        <Property Name="Text">Orxonox version 0.0.3
     40   
     41    Programming Language:  C++ - lua - tcl
     42    Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE
     43    Licence:  GNU General Public Licence - Creative Commons
     44   
     45    http://www.orxonox.net
     46   
     47    Credits:
    5048                      </Property>
    5149                    </Window>
     
    6159    </Window>
    6260</GUILayout>
    63 
    64 
    65 
    66 
    67 
  • code/branches/presentation2011/data/gui/layouts/MiscConfigMenu.layout

    r7888 r8977  
    22
    33<GUILayout >
    4     <Window Type="DefaultWindow" Name="orxonox/MiscConfigMenu/Background" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MiscConfigMenu/Background" >
     5        <Property Name="FrameEnabled" Value="False" />
    56        <Property Name="InheritsAlpha" Value="False" />
    67        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    78        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     9        <Property Name="BackgroundEnabled" Value="False" />
    810        <Window Type="MenuWidgets/StaticText" Name="orxonox/MicsConfigMenu/ConfigWindow" >
    911            <Property Name="Text" Value="Miscellaneous" />
     
    3436            </Window>
    3537        </Window>
    36         <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/MiscConfigBackButton" >
    37             <Property Name="Text" Value="Back" />
     38        <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/CancelButton" >
     39            <Property Name="Text" Value="Cancel" />
    3840            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    39             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    40             <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigBackButton_clicked"/>
     41            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
     42            <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigCancelButton_clicked"/>
     43        </Window>
     44        <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/OKButton" >
     45            <Property Name="Text" Value="OK" />
     46            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     47            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
     48            <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigOKButton_clicked"/>
    4149        </Window>
    4250    </Window>
  • code/branches/presentation2011/data/gui/layouts/SingleplayerMenu.layout

    r7648 r8977  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    17             <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />
    18             <Window Type="MenuWidgets/Listbox" Name="orxonox/SingleplayerLevelListbox" >
     17            <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
     18            <Window Type="MenuWidgets/TabControl" Name="orxonox/SingleplayerTabControl" >
     19                <Property Name="TabHeight" Value="{0,26.4388}" />
    1920                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    20                 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
     21                <Property Name="TabPanePosition" Value="Top" />
     22                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
    2123            </Window>
    22             <Window Type="MenuWidgets/Checkbox" Name="orxonox/SingleplayerShowAllCheckbox" >
    23                 <Property Name="Text" Value="show all" />
     24            <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerLevelImage" >
     25                <Property Name="AlwaysOnTop" Value="True" />
    2426                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    25                 <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.87,0},{0.8,0},{.97,0}}" />
    26                 <Event Name="CheckStateChanged" Function="SingleplayerMenu.SingleplayerShowAll_clicked"/>
     27                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.25,0},{0.9,0},{0.675,0}}" />
     28            </Window>
     29            <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerLevelDescription" >
     30                <Property Name="AlwaysOnTop" Value="True" />
     31                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     32                <Property Name="VertScrollbar" Value="True" />
     33                <Property Name="HorzScrollbar" Value="True" />
     34                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
    2735            </Window>
    2836        </Window>
     
    3038            <Property Name="Text" Value="Start" />
    3139            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    32             <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
     40            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
    3341            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
     42        </Window>
     43        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigButton" >
     44            <Property Name="Text" Value="Configure" />
     45            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     46            <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
     47            <Property Name="Disabled" Value="True" />
     48            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
    3449        </Window>
    3550        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
    3651            <Property Name="Text" Value="Back" />
    3752            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    38             <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
     53            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
    3954            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/>
    4055        </Window>
  • code/branches/presentation2011/data/gui/scripts/CreditsMenu.lua

    r8888 r8977  
    1414function P.onShow()
    1515    local description = winMgr:getWindow("orxonox/CreditsText")
    16     description:setProperty("HorzFormatting", "WordWrapLeftAligned")
    17     description:setProperty("VertFormatting", "TopAligned")
    18     description:setText("                                   Orxonox version 0.0.3 \n \
    19       Programming Language:  C++ - lua - tcl  \
    20       Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE  \
    21       Licence:  GNU General Public Licence - Creative Commons \n  \
    22       http://www.orxonox.net \n \
    23       Credits:")
    2416
    25     description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
    2617    height = getStaticTextWindowHeight(description)
    27     description:setHeight(CEGUI.UDim(0, height))
     18    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(0.0, height)))
    2819end
    2920
  • code/branches/presentation2011/data/gui/scripts/InGameMenu.lua

    r8079 r8977  
    4343-- events for ingamemenu
    4444function P.button_quit_clicked(e)
    45     openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
     45    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.exitCallback )
    4646end
    4747
    4848function P.button_mainmenu_clicked(e)
    49     orxonox.execute("startMainMenu")
    50     hideMenuSheet("InGameMenu")
     49    openDecisionPopup( "Do you really want to return to the main menu?", InGameMenu.mainMenuCallback )
    5150end
    5251
     
    5958end
    6059
    61 function P.callback(doExit)
     60function P.mainMenuCallback(doExit)
     61    if doExit then
     62        orxonox.execute("startMainMenu")
     63        hideMenuSheet("InGameMenu")
     64    else
     65        P.onShow()
     66    end
     67end
     68
     69function P.exitCallback(doExit)
    6270    if doExit then
    6371        hideMenuSheet("InGameMenu")
  • code/branches/presentation2011/data/gui/scripts/MiscConfigMenu.lua

    r8729 r8977  
    1111P.lineHeight = 0
    1212P.commandWidth = 0
    13 P.configWidth = 0
     13P.editboxWidth = 0
    1414P.resetWidth = 0
    1515P.spaceWidth = 0
     
    7575    end
    7676
    77     P.sampleWindow:setText("configure")
    78     size = getMinTextSize(P.sampleWindow)
    79     P.configWidth = size[2]+20
    80 
    8177    P.sampleWindow:setText("reset")
    8278    size = getMinTextSize(P.sampleWindow)
    8379    P.resetWidth = size[2]+20
    8480
    85     P.spaceWidth = math.floor(1/8*P.configWidth)
     81    P.spaceWidth = 10
     82   
     83    local pane = tolua.cast(winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane"), "CEGUI::ScrollablePane")
     84    size = pane:getViewableArea()
     85    P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth
    8686
    8787    P.createLines()
    8888
    8989    P:setButton(1, 1, {
    90             ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigBackButton"),
    91             ["callback"]  = P.MiscConfigBackButton_clicked
     90            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/CancelButton"),
     91            ["callback"]  = P.MiscConfigCancelButton_clicked
     92    })
     93   
     94    P:setButton(1, 2, {
     95            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/OKButton"),
     96            ["callback"]  = P.MiscConfigOKButton_clicked
    9297    })
    9398end
     
    95100function P.createLine(k)
    96101    local offset = 0
     102    -- content window for the entire line
    97103    local line = winMgr:createWindow("DefaultWindow", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k)
    98104    line:setHeight(CEGUI.UDim(0, P.lineHeight))
    99105    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
    100106
     107    -- config name
    101108    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")
    102109    command:setText(P.nameList[k])
     
    106113    offset = offset + P.commandWidth + P.spaceWidth
    107114
     115    -- config value (editable)
    108116    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
    109117    configvalue:setProperty("ReadOnly", "set:False")
    110118    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k])
    111119    configvalue:setText(value)
    112     P.sampleWindow:setText(value)
    113     local size = getMinTextSize(P.sampleWindow)
    114     local configvalueWidth = 2*size[2]
    115     configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, configvalueWidth), CEGUI.UDim(0.9, 0)))
     120    configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.editboxWidth), CEGUI.UDim(0.9, 0)))
    116121    configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
     122    -- enable the reset button if the value changed
     123    orxonox.GUIManager:subscribeEventHelper(configvalue, "TextAccepted", P.name .. ".MiscConfigEditbox_textAccepted")
    117124    line:addChildWindow(configvalue)
    118     offset = offset + configvalueWidth + P.spaceWidth
     125    offset = offset + P.editboxWidth + P.spaceWidth
    119126
    120     local config = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Config")
    121     config:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.configWidth), CEGUI.UDim(0.9, 0)))
    122     config:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
    123     config:setText("configure")
    124     orxonox.GUIManager:subscribeEventHelper(config, "Clicked", P.name .. ".MiscConfigConfigure_clicked")
    125     line:addChildWindow(config)
    126     offset = offset + P.configWidth + P.spaceWidth
    127 
     127    -- reset button (only available when value changed)
    128128    local reset = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
    129129    reset:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
    130130    reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
    131131    reset:setText("reset")
    132     orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigReset_clicked")
     132    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigResetButton_clicked")
    133133    line:addChildWindow(reset)
    134134    reset:setEnabled(false)
     
    153153end
    154154
    155 function P.MiscConfigReset_clicked(e)
     155function P.MiscConfigOKButton_clicked(e)
     156    for k,v in pairs(P.commandList) do
     157        -- save the changes
     158        local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
     159        orxonox.CommandExecutor:execute("config " .. P.commandList[k] .. " " .. editbox:getText())
     160        local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
     161        resetButton:setEnabled(false)
     162    end
     163   
     164    hideMenuSheet("MiscConfigMenu")
     165end
     166
     167function P.MiscConfigCancelButton_clicked(e)
     168    hideMenuSheet("MiscConfigMenu")
     169end
     170
     171function P.MiscConfigEditbox_textAccepted(e)
    156172    local we = CEGUI.toWindowEventArgs(e)
    157173    local name = we.window:getName()
     
    160176    local commandNr = tonumber(match())
    161177
    162     -- TODO: Implement reset.
     178    local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
     179    resetButton:setEnabled(true)
    163180end
    164181
    165 function P.MiscConfigConfigure_clicked(e)
     182function P.MiscConfigResetButton_clicked(e)
    166183    local we = CEGUI.toWindowEventArgs(e)
    167184    local name = we.window:getName()
     
    170187    local commandNr = tonumber(match())
    171188
    172     local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
    173 
    174     orxonox.CommandExecutor:execute("config " .. P.commandList[commandNr] .. " " .. window:getText())
     189    -- reload the old value
     190    local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
    175191    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr])
    176     window:setText(value)
    177 end
    178 
    179 function P.MiscConfigBackButton_clicked(e)
    180     hideMenuSheet("MiscConfigMenu")
     192    editbox:setText(value)
     193   
     194    we.window:setEnabled(false)
    181195end
    182196
  • code/branches/presentation2011/data/gui/scripts/SingleplayerMenu.lua

    r8706 r8977  
    44
    55P.levelList = {}
    6 P.itemList = {}
    7 P.showAll = false
     6P.activeTabIndexes = {}
     7P.scrollbarWidth = 13
    88
    99function P.onLoad()
    10     local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox")
    11     local button = tolua.cast(window,"CEGUI::Checkbox")
    12     button:setSelected(false)
    1310    P.createLevelList()
    14 
    15     --buttons are arranged in a 1x2 matrix
     11   
     12    -- create tabs with desired tab as argument (nil for all)
     13    P.createFilterTab("Gametypes", "gametype")
     14    P.createFilterTab("Missions", "mission")
     15    P.createFilterTab("Minigames", "minigame")
     16    P.createFilterTab("Showcases", "showcase")
     17    P.createFilterTab("Presentations", "presentation")
     18    P.createFilterTab("Tests", "test")
     19    P.createFilterTab("Show All", nil)
     20   
     21    -- update description and screenshot boxes
     22    P.SingleplayerSelectionChanged()
     23   
     24    --buttons are arranged in a 1x3 matrix
    1625    P:setButton(1, 1, {
    1726            ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"),
     
    2029
    2130    P:setButton(1, 2, {
     31            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigButton"),
     32            ["callback"]  = P.SingleplayerConfigButton_clicked
     33    })
     34
     35    P:setButton(1, 3, {
    2236            ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"),
    2337            ["callback"]  = P.SingleplayerBackButton_clicked
     
    2539end
    2640
    27 function 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
    35 end
    36 
    3741function P.createLevelList()
    3842    P.levelList = {}
    39     P.itemList = {}
    40     local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
    41     listbox:resetList()
    42     orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
    43     local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
    4443    local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
    4544    local index = 0
     
    4847        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    4948        if level ~= nil then
    50             if P.showAll or not level:hasTag("test") then
    51                 table.insert(P.levelList, level)
     49            local levelXMLFilename = level:getXMLFilename()
     50            -- create an imageset for each screenshot
     51            local imageName = level:getScreenshot()
     52            if imageName ~= "" then
     53                CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile(levelXMLFilename..imageName, imageName)
     54            else
     55                CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile(levelXMLFilename..imageName, "noscreenshot.png")
    5256            end
     57            table.insert(P.levelList, level)
    5358        end
    5459        index = index + 1
    5560    end
     61end
    5662
     63function P.createFilterTab(name, tag)
     64    -- create unique tab window name
     65    local tabName = "orxonox/SingleplayerLevelTab"
     66    if tag ~= nil then
     67        tabName = tabName..tag
     68    end
     69    -- create new tab window with desired name
     70    local listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
     71    listbox:setText(name)
     72    listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
     73    listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}")
     74    -- fill listbox with items
     75    listbox:resetList()
     76    orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
     77    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     78    local tabIndexes = {}
    5779    for k,v in pairs(P.levelList) do
    58         local item = CEGUI.createListboxTextItem(v:getName())
    59         item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    60         listbox:addItem(item)
    61         if v:getXMLFilename() == preselect then
    62             listbox:setItemSelectState(item, true)
     80        -- only add level if it has desired tag
     81        if tag == nil or v:hasTag(tag) then
     82            local item = CEGUI.createListboxTextItem(v:getName())
     83            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
     84            listbox:addItem(item)
     85            table.insert(tabIndexes, k)
     86            if v:getXMLFilename() == preselect then
     87                listbox:setItemSelectState(item, true)
     88            end
     89            orxonox.GUIManager:setTooltipTextHelper(item, v:getDescription())
    6390        end
    64         P.itemList[k] = listbox:getListboxItemFromIndex(k-1)
    65         orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription())
     91    end
     92    table.insert(P.activeTabIndexes, tabIndexes)
     93    -- listen to selection changes
     94    orxonox.GUIManager:subscribeEventHelper(listbox, "ItemSelectionChanged", P.name..".SingleplayerSelectionChanged")
     95    local tabControl = winMgr:getWindow("orxonox/SingleplayerTabControl")
     96    orxonox.GUIManager:subscribeEventHelper(tabControl, "TabSelectionChanged", P.name..".SingleplayerSelectionChanged")
     97    if listbox:getItemCount() > 0 then
     98        tabControl:addChildWindow(tabName)
     99    end
     100end
     101
     102function P.SingleplayerGetSelectedLevel()
     103    -- choose the active listbox
     104    local tabControl = CEGUI.toTabControl(winMgr:getWindow("orxonox/SingleplayerTabControl"))
     105    local listbox = CEGUI.toListbox(tabControl:getTabContentsAtIndex(tabControl:getSelectedTabIndex()))
     106    local choice = listbox:getFirstSelectedItem()
     107    if choice ~= nil then
     108        -- get the right tab and the right index
     109        local tabIndexes = P.activeTabIndexes[tabControl:getSelectedTabIndex()+1]
     110        local index = tabIndexes[listbox:getItemIndex(choice)+1]
     111        return P.levelList[index]
     112    else
     113        return nil
     114    end
     115end
     116
     117function P.SingleplayerSelectionChanged(e)
     118    local levelImage = winMgr:getWindow("orxonox/SingleplayerLevelImage")
     119    local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription")
     120    local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton")
     121    local level = P.SingleplayerGetSelectedLevel()
     122    if level ~= nil then
     123        local levelXMLFilename = level:getXMLFilename()
     124        local imageName = level:getScreenshot()
     125        -- set the screenshot and the description for the selected level
     126        levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
     127        levelDescription:setText(level:getDescription())
     128        -- only enable config button for "gametype" levels
     129        if level:hasTag("gametype") then
     130            configButton:setProperty("Disabled", "False")
     131        else
     132            configButton:setProperty("Disabled", "True")
     133        end
     134    else
     135        -- also take care of "no level selected"
     136        levelImage:setProperty("Image", nil)
     137        levelDescription:setText("")
     138        configButton:setProperty("Disabled", "True")
    66139    end
    67140end
    68141
    69142function P.SingleplayerStartButton_clicked(e)
    70     local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
    71     local choice = listbox:getFirstSelectedItem()
    72     if choice ~= nil then
    73         local index = listbox:getItemIndex(choice)
    74         local level = P.levelList[index+1]
    75         if level ~= nil then
    76             orxonox.execute("startGame " .. level:getXMLFilename())
    77             hideAllMenuSheets()
    78         end
     143    local level = P.SingleplayerGetSelectedLevel()
     144    if level ~= nil then
     145        orxonox.execute("startGame " .. level:getXMLFilename())
     146        hideAllMenuSheets()
    79147    end
    80148end
    81149
    82 function P.SingleplayerShowAll_clicked(e)
    83     local checkbox = tolua.cast(winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox"), "CEGUI::Checkbox")
    84     local show = checkbox:isSelected()
    85     if show ~= P.showAll then
    86         P.showAll = show
    87         P.createLevelList()
    88    end
     150function P.SingleplayerConfigButton_clicked(e)
     151    local level = P.SingleplayerGetSelectedLevel()
     152    if level ~= nil then
     153        local configMenu = showMenuSheet("SingleplayerConfigMenu")
     154        configMenu:loadConfig(level)
     155    end
    89156end
    90157
     
    94161
    95162return P
    96 
  • code/branches/presentation2011/data/levels/FPSTest.oxw

    r8706 r8977  
    33 description = "Level to test First Person Shooter"
    44 tags = "test"
     5 screenshot = "fpstestlevel.png"
    56/>
    67
     
    1415?>
    1516
    16 <Level
    17  name         = "fps"
    18  description  = "tests"
    19 >
     17<Level>
    2018  <templates>
    2119    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/asteroids.oxw

    r8706 r8977  
     1<LevelInfo
     2 name = "Asteroids Race"
     3 description = "Reach the checkpoints and avoid asteroids."
     4 tags = "gametype"
     5 screenshot = "asteroids.png"
     6/>
     7
    18<?lua
    29  include("HUDTemplates3.oxo")
     
    714
    815<Level
    9  name         = "Asteroids Race"
    10  description  = "testmap for gametype asteroid race"
    11  gametype     =  Asteroids
     16 gametype = "Asteroids"
    1217>
    1318  <templates>
  • code/branches/presentation2011/data/levels/docking.oxw

    r8706 r8977  
    22 name = "Transporter"
    33 description = "Level with a Transporter. Demonstrates the docking system."
    4  tags = ""
     4 tags = "showcase"
     5 screenshot = "transporter.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Transporter"
    16  description  = "Docking example level"
    17 >
     15<Level>
    1816  <templates>
    1917    <Template link="lodtemplate_default" />
  • code/branches/presentation2011/data/levels/dynamicMatch.oxw

    r8706 r8977  
     1<LevelInfo
     2 name = "Dynamic Match"
     3 description = "Dynamicmatch: Take care of what you're shooting at."
     4 tags = "gametype"
     5 screenshot = "dynamicMatch.png"
     6/>
     7
    18<?lua
    29  include("HUDTemplates3.oxo")
     
    916
    1017<Level
    11  name         = "Dynamic Match"
    12  description  = "In progress -level for dynamicmatch"
    13  gametype     = "Dynamicmatch"
     18 gametype = "Dynamicmatch"
    1419>
    1520  <templates>
  • code/branches/presentation2011/data/levels/earth.oxw

    r8706 r8977  
    33 description = "1:100 Scale Model of Earth with Gravity"
    44 tags = "showcase"
     5 screenshot = "earthdemonstration.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Planet Earth"
    16  description  = "1:100 Scale Model of Earth with Gravity"
    17 >
     15<Level>
    1816  <templates>
    1917    <Template link="lodtemplate_default" />
  • code/branches/presentation2011/data/levels/emptyLevel.oxw

    r8706 r8977  
    33 description = "A level with absolutely nothing in it."
    44 tags = "test"
     5 screenshot = "emptylevel.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name         = "Sample"
    20  description  = "Just a few tests"
    21 >
     19<Level>
    2220  <templates>
    2321    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/events.oxw

    r8706 r8977  
    22  name = "Events showcase"
    33  description = "Level to test and showcase events."
    4   tags = "test, showcase"
     4  tags = "test, showcase"
     5  screenshot = "eventsshowcase.png"
    56/>
    67
     
    1314?>
    1415
    15 <Level
    16  name         = "Event testing"
    17  description  = "A simple level to test the event-system (with comments)"
    18 >
     16<Level>
    1917  <templates>
    2018    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/lastManStanding.oxw

    r8706 r8977  
    22 name = "Last Man Standing"
    33 description = "Be the sole survivor."
    4  tags = ""
     4 tags = "gametype"
     5 screenshot = "lastmanstanding.png"
    56/>
    67
     
    1617
    1718<Level
    18  name         = "Last Man Standing"
    19  description  = "testmap for gametype last man standing"
    20  gametype     =  "LastManStanding"
     19 gametype = "LastManStanding"
    2120>
    2221  <templates>
  • code/branches/presentation2011/data/levels/lastTeamStanding.oxw

    r8891 r8977  
    22 name = "Last Team Standing"
    33 description = "Survive as a team."
    4  tags = "singleplayer"
     4 tags = "gametype"
     5 screenshot = "lastteamstanding.png"
    56/>
    67<?lua
     
    1516
    1617<Level
    17  name         = "Last Team Standing"
    18  description  = "testmap for gametype last team standing"
    19  gametype     =  "LastTeamStanding"
     18 gametype = "LastTeamStanding"
    2019>
    2120  <templates>
  • code/branches/presentation2011/data/levels/myTestLevel.oxw

    r8706 r8977  
    33 description = "A level to test the Class SpaceBoundaries."
    44 tags = "test"
     5 screenshot = "mytestlevel.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name         = "Sample"
    20  description  = "Just a few tests"
    21 >
     19<Level>
    2220  <templates>
    2321    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/notifications.oxw

    r8706 r8977  
    33 description = "Level to test and showcase notifications."
    44 tags = "test, showcase"
     5 screenshot = "notificationsshowcase.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Presentation"
    16  description  = "A simple testlevel"
    17 >
     15<Level>
    1816    <templates>
    1917        <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/pickups.oxw

    r8706 r8977  
    33 description = "Level to test and showcase pickups."
    44 tags = "test, showcase"
     5 screenshot = "pickupsshowcase.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name         = "Sample"
    20  description  = "Just a few tests"
    21 >
     19<Level>
    2220  <templates>
    2321    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/pirateAttack.oxw

    r8706 r8977  
    33 description = "Dani's Testlevel"
    44 tags = "test"
     5 screenshot = "pirateattack.png"
    56/>
    67
     
    2627   
    2728<Level
    28 name="Dani's Testlevel"
    29 description="Erste Versuche mit den Quests"
    30 gametype=TeamDeathmatch
     29 gametype = "TeamDeathmatch"
    3130>
    3231
  • code/branches/presentation2011/data/levels/planets.oxw

    r8891 r8977  
    33 description = "Demonstration of Planets"
    44 tags = "showcase"
     5 screenshot = "planetdemonstration.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Planet"
    16  description  = "Demonstration of Planets"
    17 >
     15<Level>
    1816  <templates>
    1917    <Template link="lodtemplate_default" />
  • code/branches/presentation2011/data/levels/pong.oxw

    r8706 r8977  
    22 name = "Pong"
    33 description = "Pong in space!"
    4  tags = ""
     4 tags = "minigame"
     5 screenshot = "pong.png"
    56/>
    67
     
    4950
    5051<Level
    51  name         = "Presentation"
    52  description  = "A simple testlevel"
    53  gametype     = Pong
     52 gametype = "Pong"
    5453>
    5554  <templates>
  • code/branches/presentation2011/data/levels/portals.oxw

    r8706 r8977  
    33 name = "Portals"
    44 description = "Level for testing portals"
    5  tags = "tutorial"
     5 tags = "test"
     6 screenshot = "portals.png"
    67/>
    78
     
    1415?>
    1516
    16 <Level
    17  name         = "Presentation"
    18  description  = "A simple testlevel"
    19 >
     17<Level>
    2018  <templates>
    2119    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentation.oxw

    r8706 r8977  
    33 description = "Presentation Level"
    44 tags = "presentation"
     5 screenshot = "presentation.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Sample"
    16  description  = "Just a few tests"
    17 >
     15<Level>
    1816  <templates>
    1917    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentation09.oxw

    r8706 r8977  
    33 description = "3rd Presentation level for Orxonox Convention X"
    44 tags = "presentation"
     5 screenshot = "presentationx3rd.png"
    56/>
    67
     
    1314?>
    1415
    15 <Level
    16  name         = "Presentation09"
    17  description  = "presentation level for Orxonox Convention X"
    18 
    19 >
     16<Level>
    2017  <templates>
    2118    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentation09b.oxw

    r8706 r8977  
    33 description = "2nd Presentation level for Orxonox Convention X"
    44 tags = "presentation"
     5 screenshot = "presentationx2.png"
    56/>
    67
     
    1617
    1718<Level
    18  name         = "Presentation09"
    19  description  = "presentation level for Orxonox Convention X"
    20  gametype     = TeamDeathmatch
     19 gametype = "TeamDeathmatch"
    2120>
    2221  <templates>
  • code/branches/presentation2011/data/levels/presentationDM.oxw

    r8858 r8977  
    33 description = "Presentation Level"
    44 tags = "presentation"
     5 screenshot = "presentationdm.png"
    56/>
    67
     
    1415
    1516<Level
    16  name         = "Presentation"
    17  description  = "A simple testlevel"
    18  gametype     = Deathmatch
     17 gametype = "Deathmatch"
    1918>
    2019  <templates>
  • code/branches/presentation2011/data/levels/presentationFS10.oxw

    r8706 r8977  
    33 description = "1st Presentation level for Orxonox Convention XI"
    44 tags = "presentation"
     5 screenshot = "presentationxi.png"
    56/>
    67
     
    1920
    2021<Level
    21  name         = "Sample"
    22  description  = "Just a few tests"
    23  gametype     = TeamDeathmatch
     22 gametype = "TeamDeathmatch"
    2423>
    2524  <templates>
  • code/branches/presentation2011/data/levels/presentationFS102.oxw

    r8706 r8977  
    33 description = "2nd Presentation level for Orxonox Convention XI, FPS"
    44 tags = "presentation"
     5 screenshot = "presentationxifps1st.png"
    56/>
    67
     
    1415?>
    1516
    16 <Level
    17  name         = "fps"
    18  description  = "tests"
    19 >
     17<Level>
    2018  <templates>
    2119    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentationFS10Ed.oxw

    r8706 r8977  
    33 description = "3rd Presentation level for Orxonox Convention XI, FPS"
    44 tags = "presentation"
     5 screenshot = "presentationxifps2nd.png"
    56/>
    67
     
    1415?>
    1516
    16 <Level
    17  name         = "fps"
    18  description  = "tests"
    19 >
     17<Level>
    2018  <templates>
    2119    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentationFS11.oxw

    r8706 r8977  
    22 name = "Presentation FS11"
    33 description = "Presentation level spring semester '11"
    4  tags = "test"
     4 tags = "presentation"
     5 screenshot = "presentationfs11.png"
    56/>
    67
     
    2122?>
    2223
    23 <Level
    24  name         = "Sample"
    25  description  = "Just a few tests"
    26 >
     24<Level>
    2725  <templates>
    2826    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/presentationHS09.oxw

    r8706 r8977  
    33 description = "1st Presentation level for Orxonox Convention X"
    44 tags = "presentation"
     5 screenshot = "presentationx1st.png"
    56/>
    67
     
    1617
    1718<Level
    18  name         = "Presentation09"
    19  description  = "presentation level for Orxonox Convention X"
    20  gametype     = TeamDeathmatch
     19 gametype = "TeamDeathmatch"
    2120 hasPhysics = true
    2221>
  • code/branches/presentation2011/data/levels/presentationHS09b.oxw

    r8706 r8977  
    33 description = "2nd Presentation level for Orxonox Convention X"
    44 tags = "presentation"
     5 screenshot = "presentationx2nd.png"
    56/>
    67
     
    2223
    2324<Level
    24  name         = "Sample"
    25  description  = "Just a few tests"
    26  gametype     = TeamDeathmatch
     25 gametype = "TeamDeathmatch"
    2726>
    2827  <templates>
  • code/branches/presentation2011/data/levels/princessAeryn.oxw

    r8706 r8977  
    22 name = "The Tale of Princess Aeryn"
    33 description = "The Tale of the elusive but beautiful Princess Aeryn"
    4  tags = ""
     4 tags = "mission"
     5 screenshot = "thetaleofprincessaeryn.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name     = "The Tale of Princess Aeryn"
    20  description  = "The Tale of Princess Aeryn"
    21 >
     19<Level>
    2220
    2321  <templates>
  • code/branches/presentation2011/data/levels/quests.oxw

    r8706 r8977  
    33 description = "Level to test and showcase quests."
    44 tags = "test, showcase"
     5 screenshot = "questsshowcase.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Questsystem"
    16  description  = "Just a few tests"
    17 >
     15<Level>
    1816    <templates>
    1917        <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/screenshot.oxw

    r8706 r8977  
    22 name = "Screenshot"
    33 description = "Level to make awesome screenshots in."
    4  tags = "test"
     4 tags = "test, showcase"
     5 screenshot = "screenshot.png"
    56/>
    67
     
    1516
    1617<Level
    17  name         = "Waypoints"
    18  description  = "Testing waypoings for AI controlled spaceships."
    19  gametype     = TeamDeathmatch
     18 gametype = "TeamDeathmatch"
    2019>
    2120  <templates>
  • code/branches/presentation2011/data/levels/shieldTest.oxw

    r8706 r8977  
    33 description = "A simple Level with one shielded drone to shoot at"
    44 tags = "test"
     5 screenshot = "shieldtestlevel.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "shieldTL"
    16  description  = "LEVEL-DESCRIPTION"
    17 >
     15<Level>
    1816
    1917<templates>
  • code/branches/presentation2011/data/levels/sound.oxw

    r8706 r8977  
    22 name = "Sound showcase"
    33 description = "Level to test and showcase sound."
    4  tags = "test"
     4 tags = "test, showcase"
     5 screenshot = "soundshowcase.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name         = "Sample"
    20  description  = "Just a few tests"
    21 >
     19<Level>
    2220  <templates>
    2321    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/spaceRace.oxw

    r8706 r8977  
    11<LevelInfo
    22 name = "Space Race"
    3  description = "Test level for the gametype Space Race."
    4  tags = "test"
     3 description = "Have a furious Race in Space: Reach the checkpoints as fast as possible."
     4 tags = "gametype"
     5 screenshot = "spacerace.png"
    56/>
    67
     
    1718
    1819<Level
    19  name         = "Space Race"
    20  description  = "Test level for the gametype Space Race."
    21  gametype     = SpaceRace
     20 gametype = "SpaceRace"
    2221>
    2322  <templates>
  • code/branches/presentation2011/data/levels/teamBaseMatch.oxw

    r8706 r8977  
    11<LevelInfo
    22 name = "Teambase Match"
    3  description = "Fight for the bases."
    4  tags = ""
     3 description = "Fight for the bases. Capture bases by shooting at them and defend them against attackers."
     4 tags = "gametype"
     5 screenshot = "teambasematch.png"
    56/>
    67
     
    1516
    1617<Level
    17  name         = "Presentation"
    18  description  = "A simple testlevel"
    19  gametype     = TeamBaseMatch
     18 gametype = "TeamBaseMatch"
    2019>
    2120
  • code/branches/presentation2011/data/levels/teamDeathMatch.oxw

    r8706 r8977  
    22 name = "Team Deathmatch"
    33 description = "Fight against each other in teams."
    4  tags = ""
     4 tags = "gametype"
     5 screenshot = "teamdeathmatch.png"
    56/>
    67
     
    1516
    1617<Level
    17  name         = "Waypoints"
    18  description  = "Testing waypoings for AI controlled spaceships."
    19  gametype     = TeamDeathmatch
     18 gametype = "TeamDeathmatch"
    2019>
    2120  <templates>
  • code/branches/presentation2011/data/levels/testStars.oxw

    r8706 r8977  
    33 description = "Level to test stars"
    44 tags = "test"
     5 screenshot = "starstestlevel.png"
    56/>
    67
     
    1617?>
    1718
    18 <Level
    19  name         = "Sample"
    20  description  = "Just a few tests"
    21 >
     19<Level>
    2220  <templates>
    2321    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/testSwallow.oxw

    r8706 r8977  
    33 description = "Level to test the swallow spaceship."
    44 tags = "test"
     5 screenshot = "swallowtestlevel.png"
    56/>
    67
     
    1314?>
    1415
    15 <Level
    16  name         = "Presentation_swallow"
    17  description  = "presentation level for Orxonox Convention X"
    18 
    19 >
     16<Level>
    2017
    2118  <templates>
  • code/branches/presentation2011/data/levels/tetris.oxw

    r8706 r8977  
    22 name = "Tetris"
    33 description = "Tetris in space!"
    4  tags = ""
     4 tags = "minigame"
     5 screenshot = "tetris.png"
    56/>
    67
     
    3031
    3132<Level
    32  name         = "Presentation"
    33  description  = "A simple testlevel"
    34  gametype     = "Tetris"
     33 gametype = "Tetris"
    3534>
    3635  <templates>
  • code/branches/presentation2011/data/levels/theTimeMachine.oxw

    r8706 r8977  
    22 name = "The Time Machine"
    33 description = "A simple level. The only goal is to defeat as much enemies as you can."
    4  tags = "singleplayer"
     4 tags = "gametype"
     5 screenshot = "thetimemachine.png"
    56/>
    67
     
    6162
    6263<Level
    63     name="The Time Machine"
    64     description="A simple level. The only goal is to defeat as much enemies as you can."
    65     gametype=TeamDeathmatch
     64 gametype = "TeamDeathmatch"
    6665>
    6766    <templates>
  • code/branches/presentation2011/data/levels/tutorial.oxw

    r8706 r8977  
    33 description = "Level for the coding tutorial."
    44 tags = "tutorial"
     5 screenshot = "codingtutorial.png"
    56/>
    67
     
    1213?>
    1314
    14 <Level
    15  name         = "Presentation"
    16  description  = "A simple testlevel"
    17 >
     15<Level>
    1816  <templates>
    1917    <Template link=lodtemplate_default />
  • code/branches/presentation2011/data/levels/underAttack.oxw

    r8706 r8977  
     1<LevelInfo
     2 name = "Under Attack"
     3 description = "Fight the transporter."
     4 tags = "gametype"
     5 screenshot = "underattack.png"
     6/>
     7
    18<?lua
    29  include("HUDTemplates3.oxo")
     
    815
    916<Level
    10  name         = "UnderAttack testing"
    11  description  = "A simple testlevel"
    12  gametype     = UnderAttack
     17 gametype = "UnderAttack"
    1318>
    1419  <templates>
  • code/branches/presentation2011/data/levels/waypoints.oxw

    r8706 r8977  
    33 description = "Testing waypoings for AI controlled spaceships."
    44 tags = "test"
     5 screenshot = "waypointstestlevel.png"
    56/>
    67
     
    1415?>
    1516
    16 <Level
    17  name         = "Waypoints"
    18  description  = "Testing waypoings for AI controlled spaceships."
    19 >
     17<Level>
    2018  <templates>
    2119    <Template link=lodtemplate_default />
  • code/branches/presentation2011/src/orxonox/Level.cc

    r8858 r8977  
    7171        SUPER(Level, XMLPort, xmlelement, mode);
    7272
    73         XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
    7473        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
    7574
     
    8281        registerVariable(this->xmlfilename_,            VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
    8382        registerVariable(this->name_,                   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
    84         registerVariable(this->description_,            VariableDirection::ToClient);
    8583        registerVariable(this->networkTemplateNames_,   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkCallbackTemplatesChanged));
    8684    }
  • code/branches/presentation2011/src/orxonox/Level.h

    r7163 r8977  
    4949            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5050
    51             inline void setDescription(const std::string& description)
    52                 { this->description_ = description; }
    53             inline const std::string& getDescription() const
    54                 { return this->description_; }
    55 
    5651            void playerEntered(PlayerInfo* player);
    5752            void playerLeft(PlayerInfo* player);
     
    7671            void networkcallback_applyXMLFile();
    7772
    78             std::string                    description_;
    7973            std::string                    gametype_;
    8074            std::string                    xmlfilename_;
  • code/branches/presentation2011/src/orxonox/LevelInfo.cc

    r8858 r8977  
    8787        {
    8888            LevelInfoItem::possibleTags_s.insert("test");
    89             LevelInfoItem::possibleTags_s.insert("singleplayer");
    90             LevelInfoItem::possibleTags_s.insert("multiplayer");
    9189            LevelInfoItem::possibleTags_s.insert("showcase");
    9290            LevelInfoItem::possibleTags_s.insert("tutorial");
    9391            LevelInfoItem::possibleTags_s.insert("presentation");
     92            LevelInfoItem::possibleTags_s.insert("mission");
     93            LevelInfoItem::possibleTags_s.insert("gametype");
     94            LevelInfoItem::possibleTags_s.insert("minigame");
    9495        }
    9596    }
     
    189190
    190191        XMLPortParam(LevelInfo, "description", setDescription, getDescription, xmlelement, mode);
     192        XMLPortParam(LevelInfo, "screenshot", setScreenshot, getScreenshot, xmlelement, mode);
    191193        XMLPortParam(LevelInfo, "tags", setTags, getTags, xmlelement, mode);
    192194    }
     
    203205        LevelInfoItem* info = new LevelInfoItem(this->BaseObject::getName(), this->getXMLFilename());
    204206        info->setDescription(this->getDescription());
     207        info->setScreenshot(this->getScreenshot());
    205208        info->setTags(this->getTags());
    206209        return info;
  • code/branches/presentation2011/src/orxonox/LevelInfo.h

    r8079 r8977  
    7777            */
    7878            inline const std::string& getName(void) const { return this->name_; } // tolua_export
     79       
     80            /**
     81            @brief Set the screenshot of the Level.
     82            @param screenshot The screenshot to be set.
     83            */
     84            inline void setScreenshot(const std::string& screenshot) { this->screenshot_ = std::string(screenshot); }
     85            /**
     86            @brief Get the screenshot of the Level.
     87            @return Returns the screenshot of the Level.
     88            */
     89            inline const std::string& getScreenshot() const { return this->screenshot_; } // tolua_export
    7990
    8091            /**
     
    138149            std::string name_; //!< The name of the Level.
    139150            std::string description_; //!< The description of the Level.
     151            std::string screenshot_; //!< The screenshot of the Level.
    140152            std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
    141153            std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
     
    148160        - @b name The name of the level.
    149161        - @b description The description of the level.
     162        - @b screenshot The screenshot of the level.
    150163        - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>.
    151164
     
    155168            name = "Levelname"lhs->compare(rhs) < 0
    156169            description = "This is just some awesome level."
     170            screenshot = "Screenshot.png"
    157171            tags = "test, awesome"
    158172        />
     
    172186
    173187            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
     188       
     189            /**
     190            @brief Set the screenshot of the Level.
     191            @param screenshot The screenshot to be set.
     192            */
     193            inline void setScreenshot(const std::string& screenshot) { this->LevelInfoItem::setScreenshot(screenshot); }
     194            /**
     195            @brief Get the screenshot of the Level.
     196            @return Returns the screenshot of the Level.
     197            */
     198            inline const std::string& getScreenshot() const { return this->LevelInfoItem::getScreenshot(); }
    174199
    175200            /**
  • code/branches/presentation2011/src/orxonox/worldentities/pawns/FpsPlayer.cc

    r8858 r8977  
    270270    }
    271271
    272     void FpsPlayer::boost() //acctually jump
     272    void FpsPlayer::boost(bool bBoost) //acctually jump
    273273    {
    274274        if (this->isFloor_)
  • code/branches/presentation2011/src/orxonox/worldentities/pawns/FpsPlayer.h

    r7163 r8977  
    6565                { return this->meshSrc_; }
    6666
    67             void boost(); //acctually jump
     67            void boost(bool bBoost); //acctually jump
    6868
    6969            virtual void fire();
Note: See TracChangeset for help on using the changeset viewer.