Index: code/trunk/data/gui/scripts/ChatBox-inputonly.lua
===================================================================
--- code/trunk/data/gui/scripts/ChatBox-inputonly.lua	(revision 7163)
+++ code/trunk/data/gui/scripts/ChatBox-inputonly.lua	(revision 7163)
@@ -0,0 +1,5 @@
+-- ChatBox-inputonly.lua
+
+local P = createMenuSheet("ChatBox-inputonly")
+return P
+
Index: code/trunk/data/gui/scripts/ChatBox.lua
===================================================================
--- code/trunk/data/gui/scripts/ChatBox.lua	(revision 7163)
+++ code/trunk/data/gui/scripts/ChatBox.lua	(revision 7163)
@@ -0,0 +1,10 @@
+-- ChatBox.lua
+
+local P = createMenuSheet("ChatBox")
+
+function P.ChatBoxCloseButton_clicked(e)
+    orxonox.ChatInputHandler:getInstance():deactivate()
+end
+
+return P
+
Index: code/trunk/data/gui/scripts/GUITools.lua
===================================================================
--- code/trunk/data/gui/scripts/GUITools.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/GUITools.lua	(revision 7163)
@@ -45,2 +45,11 @@
     return 0.008*ratio/0.3204
 end
+
+function getStaticTextWindowHeight(window)
+    local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel())
+    local formattedArea = lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window)
+    local frameHeight = window:getUnclippedPixelRect():getHeight() - formattedArea:getHeight()
+    local lines = window:getFont():getFormattedLineCount(window:getText(), formattedArea, CEGUI.WordWrapLeftAligned)
+    local height = lines * window:getFont():getLineSpacing() + frameHeight
+    return height
+end
Index: code/trunk/data/gui/scripts/HUDSheet.lua
===================================================================
--- code/trunk/data/gui/scripts/HUDSheet.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/HUDSheet.lua	(revision 7163)
Index: code/trunk/data/gui/scripts/InGamePickupHUD.lua
===================================================================
--- code/trunk/data/gui/scripts/InGamePickupHUD.lua	(revision 7163)
+++ code/trunk/data/gui/scripts/InGamePickupHUD.lua	(revision 7163)
@@ -0,0 +1,33 @@
+-- InGamePickupHUD.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    InGamePickupHUD = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "InGamePickupHUD"
+P.layoutString = "InGamePickupHUD.layout"
+
+function P:init()
+end
+
+
+-- events for ingamemenu
+
+
+function P.button_Pickup_clicked(e)
+    orxonox.Game:getInstance():popState()
+    orxonox.Game:getInstance():popState()
+    orxonox.Game:getInstance():requestState("mainmenu")
+    hideGUI("InGameMenu")
+end
+
+function P.close_button_clicked()
+    hideGUI("InGamePickupHUD")
+end
+
+return P
+
Index: code/trunk/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/KeyBindMenu.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/KeyBindMenu.lua	(revision 7163)
@@ -10,4 +10,5 @@
     table.insert(commandList, "fire 1 | unfire")
     table.insert(commandList, "onpress fire 2")
+    table.insert(commandList, "onpress fire 3")
     table.insert(commandList, "scale 1 moveFrontBack")
     table.insert(commandList, "scale -1 moveFrontBack")
@@ -28,4 +29,8 @@
     table.insert(commandList, "OverlayGroup toggleVisibility Debug")
     table.insert(commandList, "OverlayGroup toggleVisibility Stats")
+    table.insert(commandList, "OrxonoxOverlay toggleVisibility QuestGUI")
+    table.insert(commandList, "OrxonoxOverlay toggleVisibility PickupInventory")
+    table.insert(commandList, "startchat")
+    table.insert(commandList, "startchat_small")
     table.insert(commandList, "mouseLook")
     table.insert(commandList, "pause")
@@ -35,4 +40,5 @@
     table.insert(nameList, "Secondary Fire")
     table.insert(nameList, "Fire Rocket")
+    table.insert(nameList, "Fire Alternative Rocket")
     table.insert(nameList, "Accelerate")
     table.insert(nameList, "Break")
@@ -53,4 +59,8 @@
     table.insert(nameList, "Show Debug")
     table.insert(nameList, "Show Stats")
+    table.insert(nameList, "Show Quests")
+    table.insert(nameList, "Show Pickups")
+    table.insert(nameList, "Show Chat")
+    table.insert(nameList, "Show small Chat")
     table.insert(nameList, "Look Around")
     table.insert(nameList, "Pause")
@@ -170,5 +180,5 @@
     end
 
-    pane = tolua.cast(window, "CEGUI::ScrollablePane")
+    local pane = tolua.cast(window, "CEGUI::ScrollablePane")
     pane:setVerticalStepSize(getScrollingStepSize(window))
 end
Index: code/trunk/data/gui/scripts/MainMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MainMenu.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/MainMenu.lua	(revision 7163)
@@ -6,4 +6,5 @@
 -- events for MainMenu
 function P.QuickGameTestButton_clicked(e)
+    hideAllMenuSheets()
     orxonox.execute("startGame")
 end
Index: code/trunk/data/gui/scripts/MenuSheet.lua
===================================================================
--- code/trunk/data/gui/scripts/MenuSheet.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/MenuSheet.lua	(revision 7163)
Index: code/trunk/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MiscConfigMenu.lua	(revision 7163)
+++ code/trunk/data/gui/scripts/MiscConfigMenu.lua	(revision 7163)
@@ -0,0 +1,179 @@
+-- MiscConfigMenu.lua
+
+local P = createMenuSheet("MiscConfigMenu", true, TriBool.True, TriBool.True)
+
+P.commandList = {}
+P.nameList = {}
+P.linesList = {}
+
+P.sampleWindow = nil
+
+P.lineHeight = 0
+P.commandWidth = 0
+P.configWidth = 0
+P.resetWidth = 0
+P.spaceWidth = 0
+
+function P.onLoad()
+
+    P.commandList = {}
+    table.insert(P.commandList, "KeyBinder mouseSensitivity_")
+    table.insert(P.commandList, "KeyBinder mouseSensitivityDerived_")
+    table.insert(P.commandList, "KeyBinder bDeriveMouseInput_")
+    table.insert(P.commandList, "KeyBinder mouseWheelStepSize_")
+    table.insert(P.commandList, "Shell maxHistoryLength_")
+    table.insert(P.commandList, "Core bStartIOConsole_")
+    table.insert(P.commandList, "Game fpsLimit_")
+    table.insert(P.commandList, "Spectator speed_")
+    table.insert(P.commandList, "SpaceShip bInvertYAxis_")
+    table.insert(P.commandList, "LevelManager defaultLevelName_")
+    table.insert(P.commandList, "Gametype initialStartCountdown_")
+    table.insert(P.commandList, "Gametype bAutoStart_")
+    table.insert(P.commandList, "Gametype numberOfBots_")
+    table.insert(P.commandList, "UnderAttack gameTime_")
+    table.insert(P.commandList, "TeamDeathmatch teams_")
+    table.insert(P.commandList, "HumanPlayer nick_")
+    table.insert(P.commandList, "ChatOverlay displayTime_")
+
+    P.nameList = {}
+    table.insert(P.nameList, "Mouse sensitivity")
+    table.insert(P.nameList, "Mouse acceleration")
+    table.insert(P.nameList, "Derive mouse input")
+    table.insert(P.nameList, "Mouse wheel stepsize")
+    table.insert(P.nameList, "Shell: max. History length")
+    table.insert(P.nameList, "Start IOConsole")
+    table.insert(P.nameList, "FPS limit")
+    table.insert(P.nameList, "Spectator speed")
+    table.insert(P.nameList, "Invert Y-axis")
+    table.insert(P.nameList, "Default level")
+    table.insert(P.nameList, "Start countdown")
+    table.insert(P.nameList, "Autostart")
+    table.insert(P.nameList, "Number of Bots")
+    table.insert(P.nameList, "UnderAttack: game time")
+    table.insert(P.nameList, "TeamDeathmatch: Numer of teams")
+    table.insert(P.nameList, "Playername")
+    table.insert(P.nameList, "Chat: display time")
+
+    P.linesList = {}
+
+    --Calculate design parameters:
+    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/SampleWindow")
+    P.sampleWindow:setText("SampleText")
+
+    local size = getMinTextSize(P.sampleWindow)
+    P.lineHeight = size[1]
+
+    P.commandWidth = 0
+    for k,v in pairs(P.commandList) do
+        P.sampleWindow:setText(P.nameList[k])
+        size = getMinTextSize(P.sampleWindow)
+        if size[2] > P.commandWidth then
+            P.commandWidth = size[2]
+        end
+    end
+
+    P.sampleWindow:setText("configure")
+    size = getMinTextSize(P.sampleWindow)
+    P.configWidth = size[2]+20
+
+    P.sampleWindow:setText("reset")
+    size = getMinTextSize(P.sampleWindow)
+    P.resetWidth = size[2]+20
+
+    P.spaceWidth = math.floor(1/8*P.configWidth)
+
+    P.createLines()
+
+end
+
+function P.createLine(k)
+    local offset = 0
+    local line = winMgr:createWindow("DefaultWindow", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k)
+    line:setHeight(CEGUI.UDim(0, P.lineHeight))
+    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
+
+    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")
+    command:setText(P.nameList[k])
+    command:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
+    command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0)))
+    line:addChildWindow(command)
+    offset = offset + P.commandWidth + P.spaceWidth
+
+    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+    configvalue:setProperty("ReadOnly", "set:False")
+    orxonox.CommandExecutor:execute("getConfig " .. P.commandList[k])
+    local value = orxonox.CommandExecutor:getReturnValueString()
+    configvalue:setText(value)
+    P.sampleWindow:setText(value)
+    local size = getMinTextSize(P.sampleWindow)
+    local configvalueWidth = 2*size[2]
+    configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, configvalueWidth), CEGUI.UDim(0.9, 0)))
+    configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    line:addChildWindow(configvalue)
+    offset = offset + configvalueWidth + P.spaceWidth
+
+    local config = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Config")
+    config:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.configWidth), CEGUI.UDim(0.9, 0)))
+    config:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    config:setText("configure")
+    orxonox.GUIManager:subscribeEventHelper(config, "Clicked", P.name .. ".MiscConfigConfigure_clicked")
+    line:addChildWindow(config)
+    offset = offset + P.configWidth + P.spaceWidth
+
+    local reset = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+    reset:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
+    reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    reset:setText("reset")
+    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigReset_clicked")
+    line:addChildWindow(reset)
+    reset:setEnabled(false)
+    offset = offset + P.resetWidth + P.spaceWidth
+
+    line:setWidth(CEGUI.UDim(0, offset))
+
+    return line
+end
+
+function P.createLines()
+    local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane")
+
+    for k,v in pairs(P.commandList) do
+        local line = P.createLine(k)
+        table.insert(P.linesList, line)
+        window:addChildWindow(line)
+    end
+
+    local pane = tolua.cast(window, "CEGUI::ScrollablePane")
+    pane:setVerticalStepSize(getScrollingStepSize(window))
+end
+
+function P.MiscConfigReset_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+
+    local match = string.gmatch(name, "%d+")
+    local commandNr = tonumber(match())
+
+    -- TODO: Implement reset.
+end
+
+function P.MiscConfigConfigure_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+
+    local match = string.gmatch(name, "%d+")
+    local commandNr = tonumber(match())
+
+    local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
+
+    orxonox.CommandExecutor:execute("config " .. P.commandList[commandNr] .. " " .. window:getText())
+    orxonox.CommandExecutor:execute("getConfig " .. P.commandList[commandNr])
+    local value = orxonox.CommandExecutor:getReturnValueString()
+    window:setText(value)
+end
+
+function P.MiscConfigBackButton_clicked(e)
+    hideMenuSheet("MiscConfigMenu")
+end
+
+return P
Index: code/trunk/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MultiplayerMenu.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/MultiplayerMenu.lua	(revision 7163)
@@ -4,6 +4,72 @@
 
 function P.onLoad()
-    listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
-    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    P.multiplayerMode = "startClient"
+end
+
+function P.onShow()
+    if P.multiplayerMode == "startClient" then
+        local window = winMgr:getWindow("orxonox/MultiplayerJoinButton")
+        local button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+        P.showServerList()
+    end
+    if P.multiplayerMode == "startServer" then
+        local window = winMgr:getWindow("orxonox/MultiplayerHostButton")
+        local button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+        P.showLevelList()
+    end
+    if P.multiplayerMode == "startDedicated" then
+        local window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton")
+        local button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+        P.showLevelList()
+    end
+end
+
+function P.MultiplayerJoinButton_clicked(e)
+    P.multiplayerMode = "startClient"
+    P.showServerList()
+end
+
+function P.MultiplayerHostButton_clicked(e)
+    P.multiplayerMode = "startServer"
+    P.showLevelList()
+end
+
+function P.MultiplayerDedicatedButton_clicked(e)
+    P.multiplayerMode = "startDedicated"
+    P.showLevelList()
+end
+
+function P.MultiplayerStartButton_clicked(e)
+    local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()
+    if P.multiplayerMode == "startClient" then
+        if choice then
+            local client = orxonox.Client:getInstance()
+            local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
+            client:setDestination( P.serverList[index][2], 55556 )
+        else
+            return
+        end
+    else
+        if choice then
+            orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
+        else
+            return
+        end
+    end
+    orxonox.execute(P.multiplayerMode)
+    hideAllMenuSheets()
+end
+
+function P.MultiplayerBackButton_clicked(e)
+    hideMenuSheet(P.name)
+end
+
+function P.showLevelList()
+    local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
+    CEGUI.toListbox(listbox):resetList()
+    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     orxonox.LevelManager:getInstance():compileAvailableLevelList()
     local levelList = {}
@@ -19,7 +85,10 @@
     end
     table.sort(levelList)
+    index = 1
     for k,v in pairs(levelList) do
-        item = CEGUI.createListboxTextItem(v)
+        local item = CEGUI.createListboxTextItem(v)
         item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setID(index)
+        index = index + 1
         CEGUI.toListbox(listbox):addItem(item)
         if v .. ".oxw" == preselect then
@@ -27,45 +96,35 @@
         end
     end
-    local multiplayerMode = "startClient"
-    if multiplayerMode == "startClient" then
-        window = winMgr:getWindow("orxonox/MultiplayerJoinButton")
-        button = tolua.cast(window,"CEGUI::RadioButton")
-        button:setSelected(true)
     end
-    if multiplayerMode == "startServer" then
-        window = winMgr:getWindow("orxonox/MultiplayerHostButton")
-        button = tolua.cast(window,"CEGUI::RadioButton")
-        button:setSelected(true)
+    
+function P.showServerList()
+    local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
+    CEGUI.toListbox(listbox):resetList()
+    local discovery = orxonox.LANDiscovery:getInstance()
+    discovery:discover()
+    P.serverList = {}
+    local index = 0
+    local servername = ""
+    local serverip = ""
+    while true do
+        servername = discovery:getServerListItemName(index)
+        if servername == "" then
+            break
+        end
+        serverip = discovery:getServerListItemIP(index)
+        if serverip == "" then
+          break
+        end
+        table.insert(P.serverList, {servername, serverip})
+        index = index + 1
     end
-    if multiplayerMode == "startDedicated" then
-        window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton")
-        button = tolua.cast(window,"CEGUI::RadioButton")
-        button:setSelected(true)
+    index = 1
+    for k,v in pairs(P.serverList) do
+        local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
+        item:setID(index)
+        index = index + 1
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listbox):addItem(item)
     end
-end
-
-function P.MultiplayerJoinButton_clicked(e)
-    multiplayerMode = "startClient"
-end
-
-function P.MultiplayerHostButton_clicked(e)
-    multiplayerMode = "startServer"
-end
-
-function P.MultiplayerDedicatedButton_clicked(e)
-    multiplayerMode = "startDedicated"
-end
-
-function P.MultiplayerStartButton_clicked(e)
-    local choice = winMgr:getWindow("orxonox/MultiplayerLevelListbox"):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.execute(multiplayerMode)
-        hideAllMenuSheets()
-    end
-end
-
-function P.MultiplayerBackButton_clicked(e)
-    hideMenuSheet(P.name)
 end
 
Index: code/trunk/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/trunk/data/gui/scripts/PickupInventory.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/PickupInventory.lua	(revision 7163)
@@ -3,29 +3,85 @@
 local P = createMenuSheet("PickupInventory")
 
-P.carrierList = {}
 P.wrapper = nil
 P.detailsWindows = {}
+P.detailPickups = {}
+P.pickupsList = {}
+
+P.showing = false
+
+-- Design parameters
+P.imageHeight = 50
+P.detailImageSize = 100
+P.textHeight = 30
+P.buttonWidth = 85
 
 function P.onLoad()
-    carrierList = {}
+    P.wrapper = nil
+    P.detailsWindows = {}
+    P.detailPickups = {}
+    P.pickupsList = {}
 end
 
 function P.onShow()
     P.createInventory()
+    P.showing = true
 end
 
 function P.onHide()
-    P.cleanup()
+    P.showing = false
+    P.cleanup(true)
 end
 
 function P.update()
-    P.cleanup()
-    
+    if P.showing == false then
+        return
+    end
+
+    -- Update opened detail windows.
+    for k,v in pairs(P.detailsWindows) do
+        if v ~= nil then
+            local pickup = P.detailPickups[k]
+            if pickup ~= nil and pickup ~= 0 then
+                local useButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/UseButton")
+                local dropButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/DropButton")
+                if orxonox.PickupManager:getInstance():isValidPickup(pickup) == false then
+                    useButton:setEnabled(false)
+                    dropButton:setEnabled(false)
+                    P.detailPickups[k] = nil
+                else
+                    useButton:setEnabled(true)
+                    if pickup:isUsed() == true then
+                        useButton:setText("unuse")
+                        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
+                        if pickup:isUsable() == false then
+                            useButton:setEnabled(false)
+                        end
+                    else
+                        useButton:setText("use")
+                        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
+                        if pickup:isUnusable() == false then
+                            useButton:setEnabled(false)
+                        end
+                    end
+
+                    if pickup:isPickedUp() == false then
+                        useButton:setEnabled(false)
+                        dropButton:setEnabled(false)
+                        P.detailPickups[k] = nil
+                    end
+                end
+            end
+        end
+    end
+
+    -- Update main inventory.
+    P.cleanup(false)
     P.createInventory()
+    -- TODO: Recover scrolling position
+    
 end
 
 function P.createInventory()
     local pickupManager = orxonox.PickupManager:getInstance()
-    local carrier = pickupManager:getPawn()
     
     local root = winMgr:getWindow("orxonox/PickupInventory/Inventory")
@@ -34,109 +90,80 @@
     root:addChildWindow(P.wrapper)
     
-    P.carrierList = {}
-    
-    --Design parameters:
-    local space = 15
-    
-    P.getCarrierList(carrier)
+    P.pickupsList = {}
+
+    local numPickups = pickupManager:getNumPickups()
+    local counter = 1
     local offset = 0
-    for k,v in pairs(P.carrierList) do
-        local window = P.createCarrierBox(v,k)
+    while counter <= numPickups do
+        local pickup = pickupManager:popPickup()
+        table.insert(P.pickupsList, pickup)
+        local window = P.createPickupEntry(counter, pickup)
         window:setYPosition(CEGUI.UDim(0,offset))
-        offset = offset + window:getHeight():asAbsolute(1) + space
+        offset = offset + window:getHeight():asAbsolute(1)
         P.wrapper:addChildWindow(window)
-    end
-end
-
-function P.getCarrierList(carrier)
-
-    -- TODO: Test for nil or 0?
-    if carrier == nil then
-        return
-    end
-    
-    table.insert(P.carrierList, carrier)
-    
-    local numCarriers = orxonox.PickupManager:getInstance():getNumCarrierChildren(carrier)
-    if numCarriers == 0 then
-        return
-    end
-    
-    for i=0,numCarriers-1,1 do
-        local child = orxonox.PickupManager:getInstance():getCarrierChild(i, carrier)
-        if child ~= nil then
-            P.getCarrierList(child)
-        end
-    end
-end
-
-function P.createCarrierBox(carrier, index)
-
-    local name = "orxonox/PickupInventory/Carrier" .. index
-    
-    --Design parameters:
-    local imageHeight = 50
-    local textHeight = 30
-    local horizontalOffset = 20
-    local buttonWidth = 85
-    
-    local offset = 0
-
-    local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Box")
-    box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, 0)))
-    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -horizontalOffset), CEGUI.UDim(1, 0)))
-    
-    local numPickups = orxonox.PickupManager:getInstance():getNumPickups(carrier)
-    for i=0,numPickups-1,1 do
-        local pickup = orxonox.PickupManager:getInstance():getPickupRepresentation(i, carrier)
-        
-        local item = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i)
-        item:setSize(CEGUI.UVector2(CEGUI.UDim(1, -horizontalOffset), CEGUI.UDim(0, imageHeight)))
-        item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, offset)))
-        box:addChildWindow(item)
-        offset = offset + imageHeight+5
-        
-        local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Box/Pickup" .. i .. "/Image")
-        image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation())
-        image:setProperty("BackgroundEnabled", "set:False")
-        image:setProperty("FrameEnabled", "set:True")
-        image:setSize(CEGUI.UVector2(CEGUI.UDim(0, imageHeight), CEGUI.UDim(0, imageHeight)))
-        item:addChildWindow(image)
-        
-        local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i .. "/Title")
-        title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageHeight+5), CEGUI.UDim(0, (imageHeight-textHeight)/2)))
-        title:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0, textHeight)))
-        title:setText(pickup:getPickupName())
-        title:setProperty("FrameEnabled", "set:False")
-        item:addChildWindow(title)
-        
-        local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/UseButton")
-        useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+10),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
-        useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
+        counter = counter + 1
+    end
+
+end
+
+function P.createPickupEntry(index, pickup)
+    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup)
+
+    local name = "orxonox/PickupInventory/Box/Pickup" .. index
+
+    local item = winMgr:createWindow("MenuWidgets/StaticText", name)
+    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, P.imageHeight)))
+    item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
+
+    local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
+    image:setProperty("Image", "set:PickupInventory image:" .. representation:getInventoryRepresentation())
+    image:setProperty("BackgroundEnabled", "set:False")
+    image:setProperty("FrameEnabled", "set:True")
+    image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight), CEGUI.UDim(0, P.imageHeight)))
+    item:addChildWindow(image)
+
+    local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
+    title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight+5), CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    title:setSize(CEGUI.UVector2(CEGUI.UDim(0.3, 0), CEGUI.UDim(0, P.textHeight)))
+    title:setText(representation:getPickupName())
+    title:setProperty("FrameEnabled", "set:False")
+    item:addChildWindow(title)
+
+    local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
+    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+10),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    if pickup:isUsed() == false then
         useButton:setText("use")
         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
-        item:addChildWindow(useButton)
-        
-        local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DropButton")
-        dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+15+buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
-        dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
-        dropButton:setText("drop")
-        orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
-        item:addChildWindow(dropButton)
-        
-        local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DetailsButton")
-        detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+20+2*buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
-        detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
-        detailsButton:setText("details")
-        orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name .. ".InventoryDetailsButton_clicked")
-        item:addChildWindow(detailsButton)
-    end
-    
-    box:setHeight(CEGUI.UDim(0,offset))
-    
-    return box
-end
-
-function P.cleanup()
+        if pickup:isUsable() == false then
+            useButton:setEnabled(false)
+        end
+    else
+        useButton:setText("unuse")
+        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseButton_clicked")
+        if pickup:isUnusable() == false then
+            useButton:setEnabled(false)
+        end
+    end
+    item:addChildWindow(useButton)
+
+    local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
+    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+15+P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    dropButton:setText("drop")
+    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
+    item:addChildWindow(dropButton)
+
+    local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DetailsButton")
+    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+20+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    detailsButton:setText("details")
+    orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name .. ".InventoryDetailsButton_clicked")
+    item:addChildWindow(detailsButton)
+
+    return item
+end
+
+function P.cleanup(destroyDetails)
     if P.wrapper ~= nil then
         winMgr:destroyWindow(P.wrapper)
@@ -144,4 +171,7 @@
     
     --Destroy details windows.
+    if destroyDetails == false then
+        return
+    end
     for k,v in pairs(P.detailsWindows) do
         if v ~= nil then
@@ -151,29 +181,20 @@
 end
 
-function P.windowToCarrierHelper(e)
+function P.windowToPickupHelper(e)
     local we = CEGUI.toWindowEventArgs(e)
     local name = we.window:getName()
 
     local match = string.gmatch(name, "%d+")
-    local carrierNr = tonumber(match())
-    local pickupNr = tonumber(match())
-
-    local arguments = {}
-    arguments[1] = carrierNr
-    arguments[2] = pickupNr
-    return arguments
-end
-
-function P.createDetailsWindow(pickupIndex, carrierIndex)
-    local carrier = P.carrierList[carrierIndex]
-    local pickup = orxonox.PickupManager:getInstance():getPickupRepresentation(pickupIndex, carrier)
-    
-    local headerOffset = 35
-    --Design parameters
-    local titleHeight = 30
-    local imageSize = 100
-    local buttonWidth = 85
-    
-    local name = "orxonox/PickupInventory/Carrier" .. carrierIndex .. "/Pickup" .. pickupIndex .. "/Details" .. P.getNewDetailNumber()
+    local pickupIndex = tonumber(match())
+
+    return pickupIndex
+end
+
+function P.createDetailsWindow(pickupIndex)
+    local pickup = P.pickupsList[pickupIndex]
+    local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup)
+
+    local index = P.getNewDetailNumber()
+    local name = "orxonox/PickupInventory/Details" .. index
     
     local window = winMgr:createWindow("MenuWidgets/FrameWindow", name)
@@ -190,6 +211,6 @@
     
     local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
-    title:setText(pickup:getPickupName())
-    title:setHeight(CEGUI.UDim(0, titleHeight))
+    title:setText(representation:getPickupName())
+    title:setHeight(CEGUI.UDim(0, P.textHeight))
     title:setProperty("FrameEnabled", "set:False")
     title:setProperty("BackgroundEnabled", "set:False")
@@ -197,36 +218,48 @@
     
     local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
-    image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation())
+    image:setProperty("Image", "set:PickupInventory image:" .. representation:getInventoryRepresentation())
     image:setProperty("BackgroundEnabled", "set:False")
     image:setProperty("FrameEnabled", "set:True")
-    image:setSize(CEGUI.UVector2(CEGUI.UDim(0, imageSize), CEGUI.UDim(0, imageSize)))
-    image:setYPosition(CEGUI.UDim(0, titleHeight + 5))
+    image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize), CEGUI.UDim(0, P.detailImageSize)))
+    image:setYPosition(CEGUI.UDim(0, P.textHeight + 5))
     wrapper:addChildWindow(image)
     
     local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Description")
-    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -1*(imageSize + 10)),CEGUI.UDim(1, -(titleHeight + 5 + titleHeight + 20))))
-    box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize + 10),CEGUI.UDim(0, titleHeight + 5)))
-    local description = winMgr:createWindow("TaharezLook/StaticText", name .. "/Description/Text")
-    description:setText(pickup:getPickupDescription())
+    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -1*(P.detailImageSize + 10)),CEGUI.UDim(1, -(P.textHeight + 5 + P.textHeight + 20))))
+    box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize + 10),CEGUI.UDim(0, P.textHeight + 5)))
+    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Text")
+    description:setText(representation:getPickupDescription())
     description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     description:setProperty("VertFormatting", "TopAligned")
     box:addChildWindow(description)
     wrapper:addChildWindow(box)
-    
+
     local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
-    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10),CEGUI.UDim(1, -40)))
-    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
-    useButton:setText("use")
-    orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
+    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10),CEGUI.UDim(1, -40)))
+    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    if pickup:isUsed() == false then
+        useButton:setText("use")
+        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
+        if pickup:isUsable() == false then
+            useButton:setEnabled(false)
+        end
+    else
+        useButton:setText("unuse")
+        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
+        if pickup:isUnusable() == false then
+            useButton:setEnabled(false)
+        end
+    end
     wrapper:addChildWindow(useButton)
     
     local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
-    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10+buttonWidth+10),CEGUI.UDim(1, -40)))
-    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
+    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10+P.buttonWidth+10),CEGUI.UDim(1, -40)))
+    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     dropButton:setText("drop")
-    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
+    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropDetailButton_clicked")
     wrapper:addChildWindow(dropButton)
-    
-    table.insert(P.detailsWindows, window)
+
+    P.detailsWindows[index] = window
+    P.detailPickups[index] = pickup
     
 end
@@ -239,20 +272,40 @@
         end
     end
-    return number
+    return number+1
 end
 
 function P.InventoryUseButton_clicked(e)
-    local arguments = P.windowToCarrierHelper(e)
-    orxonox.PickupManager:getInstance():usePickup(arguments[2], P.carrierList[arguments[1]], true)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.pickupsList[pickupIndex], true)
+end
+
+function P.InventoryUnuseButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.pickupsList[pickupIndex], false)
 end
 
 function P.InventoryDropButton_clicked(e)
-    local arguments = P.windowToCarrierHelper(e)
-    orxonox.PickupManager:getInstance():dropPickup(arguments[2], P.carrierList[arguments[1]])
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():dropPickup(P.pickupsList[pickupIndex])
 end
 
 function P.InventoryDetailsButton_clicked(e)
-    local arguments = P.windowToCarrierHelper(e)
-    P.createDetailsWindow(arguments[2], arguments[1])
+    local pickupIndex = P.windowToPickupHelper(e)
+    P.createDetailsWindow(pickupIndex)
+end
+
+function P.InventoryUseDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], true)
+end
+
+function P.InventoryUnuseDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], false)
+end
+
+function P.InventoryDropDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():dropPickup(P.detailPickups[pickupIndex])
 end
 
@@ -262,11 +315,10 @@
     local name = we.window:getName()
     local match = string.gmatch(name, "%d+")
-    local carrierNr = tonumber(match())
-    local pickupNr = tonumber(match())
     local detailNr = tonumber(match())
     
-    local window = P.detailsWindows[detailNr+1]
+    local window = P.detailsWindows[detailNr]
     winMgr:destroyWindow(window)
-    P.detailsWindows[detailNr+1] = nil
+    P.detailsWindows[detailNr] = nil
+    P.detailPickups[detailNr] = nil
 end
 
Index: code/trunk/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/trunk/data/gui/scripts/QuestGUI.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/QuestGUI.lua	(revision 7163)
@@ -3,16 +3,284 @@
 local P = createMenuSheet("QuestGUI")
 
-function P.show()
-    P.window:show() -- TODO: Do this through parent...
-    P.visible = true
-
+P.rootWindow = nil
+P.detailsWindows = {}
+P.quests = {}
+P.hints = {}
+P.player = nil
+
+-- design parameters
+P.indentWidth = 20
+P.scrollbarWidth = 13
+P.buttonHeight = 30
+P.titleHeight = 26
+P.borderWidth = 5
+
+function P.onShow()
+
+    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
+
+    P.player = orxonox.GUIManager:getInstance():getPlayer(P.name)
+    P.rootWindow = P.createQuestGUI();
+
+    questsList:addChildWindow(P.rootWindow)
+end
+
+function P.onHide()
+    P.cleanup()
+end
+
+function P.createQuestGUI()
     local questManager = orxonox.QuestManager:getInstance()
 
-    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
-
-    local window = questManager:getQuestGUI(P.name)
-
-    questsList:addChildWindow(window)
-
+    local depth = 0
+    local index = 0
+
+    local questWindow = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/QuestGUI/Quests")
+    questWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0),CEGUI.UDim(1, 0)))
+
+    -- Iterate through all parent-quests.
+    local numParentQuests = orxonox.QuestManager:getInstance():getNumParentQuests(P.player)
+    local i = 0
+    while i <= numParentQuests-1 do
+        local quest = orxonox.QuestManager:getInstance():getParentQuest(P.player, i)
+        index = P.createQuestNodes(questWindow, quest, depth, index)
+        i = i+1
+    end
+
+    return questWindow
+end
+
+function P.createQuestNodes(root, parent, depth, index)
+    local number = table.getn(P.quests)+1
+    local name = "orxonox/QuestGUI/Quests/" .. number
+    local node = winMgr:createWindow("MenuWidgets/TabButton", name)
+    node:setText(orxonox.QuestManager:getInstance():getDescription(parent):getTitle())
+    node:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.indentWidth*depth), CEGUI.UDim(0, P.buttonHeight*index)))
+    node:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.indentWidth*depth-P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
+    orxonox.GUIManager:subscribeEventHelper(node, "Clicked", P.name .. ".openDetails_clicked")
+    root:addChildWindow(node)
+    
+    table.insert(P.quests, parent)
+
+    index = index+1
+
+    -- Iterate through all sub-quests.
+    local numQuests = orxonox.QuestManager:getInstance():getNumSubQuests(parent, P.player)
+    local i = 0
+    while i <= numQuests-1 do
+        local quest = orxonox.QuestManager:getInstance():getSubQuest(parent, P.player, i)
+        index = P.createQuestNodes(root, quest, depth+1, index)
+        i = i+1
+    end
+
+    return index;
+end
+
+function P.cleanup()
+    winMgr:destroyWindow(P.rootWindow)
+    for k,v in pairs(P.detailsWindows) do
+        if v ~= nil then
+            winMgr:destroyWindow(v)
+            P.detailsWindows[k] = nil
+        end
+    end
+    P.detailsWindows = {}
+
+    P.quests = {}
+    P.hints = {}
+    P.player = nil
+
+    winMgr:destroyWindow(P.rootWindow)
+    P.rootWindow = nil
+end
+
+function P.openDetails_clicked(e)
+    --Get some numbers from the window
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+    local match = string.gmatch(name, "%d+")
+    local questNr = tonumber(match())
+
+    name = name .. "/Details" .. P.getNewDetailNumber()
+    quest = P.quests[questNr]
+
+    local details = winMgr:createWindow("MenuWidgets/FrameWindow", name)
+    details:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
+    details:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0), CEGUI.UDim(0.1, 0)))
+    details:setText(orxonox.QuestManager:getInstance():getDescription(quest):getTitle())
+    details:setProperty("Alpha", 1.0)
+    details:setProperty("InheritsAlpha", "setFalse")
+    orxonox.GUIManager:subscribeEventHelper(details, "CloseClicked", P.name .. ".closeDetails_clicked")
+
+    table.insert(P.detailsWindows, details)
+
+    name = name .. "/Scrollable"
+    local window = winMgr:createWindow("MenuWidgets/ScrollablePane", name)
+    window:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
+    window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderWidth), CEGUI.UDim(0, P.titleHeight)))
+    details:addChildWindow(window)
+
+    local offset = 0
+
+    local status = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Status")
+    window:addChildWindow(status)
+    status:setProperty("HorzFormatting", "WordWrapLeftAligned")
+    status:setProperty("VertFormatting", "TopAligned")
+    if quest:isActive(P.player) then
+        status:setText("This quest is active.")
+    elseif quest:isCompleted(P.player) then
+        status:setText("This quest was completed.")
+    elseif quest:isFailed(P.player) then
+        status:setText("This quest was failed.")
+    end
+    status:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+    status:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    local height = getStaticTextWindowHeight(status)
+    status:setHeight(CEGUI.UDim(0, height))
+    offset = offset + height
+
+    local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title");
+    window:addChildWindow(descriptionTitle)
+    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
+    descriptionTitle:setProperty("VertFormatting", "TopAligned")
+    descriptionTitle:setText("Description:")
+    descriptionTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+    descriptionTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    height = getStaticTextWindowHeight(descriptionTitle)
+    descriptionTitle:setHeight(CEGUI.UDim(0, height))
+    offset = offset + height
+
+    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description");
+    window:addChildWindow(description)
+    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
+    description:setProperty("VertFormatting", "TopAligned")
+    description:setText(orxonox.QuestManager:getInstance():getDescription(quest):getDescription())
+    description:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    height = getStaticTextWindowHeight(description)
+    description:setHeight(CEGUI.UDim(0, height))
+    offset = offset + height
+
+    -- Display the hints of this quest
+    local numHints = orxonox.QuestManager:getInstance():getNumHints(quest, P.player)
+    if numHints > 0 then
+        local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title");
+        window:addChildWindow(hintsTitle)
+        hintsTitle:setProperty("HorzFormatting", "HorzCentred")
+        hintsTitle:setProperty("VertFormatting", "TopAligned")
+        hintsTitle:setText("Hints:")
+        hintsTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+        hintsTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+        height = getStaticTextWindowHeight(hintsTitle)
+        hintsTitle:setHeight(CEGUI.UDim(0, height))
+        offset = offset + height
+    end
+    local i = 0
+    while i <= numHints-1 do
+        local hint = orxonox.QuestManager:getInstance():getHints(quest, P.player, i)
+        table.insert(P.hints, hint)
+        local number = table.getn(P.hints)
+        local node = winMgr:createWindow("MenuWidgets/TabButton", name .. "/Hints" .. number)
+        node:setText(orxonox.QuestManager:getInstance():getDescription(hint):getTitle())
+        node:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+        node:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
+        window:addChildWindow(node)
+        offset = offset + P.buttonHeight
+
+        orxonox.GUIManager:subscribeEventHelper(node, "Clicked", P.name .. ".openHintDetails_clicked")
+        i = i+1
+    end
+
+    local window = winMgr:getWindow("orxonox/QuestGUI/Background")
+    window:addChildWindow(details)
+end
+
+function P.getNewDetailNumber()
+    local number = table.getn(P.detailsWindows)
+    for k,v in pairs(P.detailsWindows) do
+        if v == nil then
+            number = k-1
+        end
+    end
+    return number+1
+end
+
+function P.closeDetails_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+    local match = string.gmatch(name, "%d+")
+    match()
+    local detailsNr = tonumber(match())
+
+    winMgr:destroyWindow(P.detailsWindows[detailsNr])
+    P.detailsWindows[detailsNr] = nil
+end
+
+function P.openHintDetails_clicked(e)
+    --Get some numbers from the window
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+    local match = string.gmatch(name, "%d+")
+    match()
+    match()
+    local hintNr = tonumber(match())
+
+    name = name .. "/Details" .. P.getNewDetailNumber()
+    hint = P.hints[hintNr]
+
+    local details = winMgr:createWindow("MenuWidgets/FrameWindow", name)
+    details:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
+    details:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0), CEGUI.UDim(0.1, 0)))
+    details:setText(orxonox.QuestManager:getInstance():getDescription(hint):getTitle())
+    details:setProperty("Alpha", 1.0)
+    details:setProperty("InheritsAlpha", "setFalse")
+    orxonox.GUIManager:subscribeEventHelper(details, "CloseClicked", P.name .. ".closeHintDetails_clicked")
+
+    table.insert(P.detailsWindows, details)
+
+    name = name .. "/Scrollable"
+    local window = winMgr:createWindow("MenuWidgets/ScrollablePane", name)
+    window:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
+    window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderWidth), CEGUI.UDim(0, P.titleHeight)))
+    details:addChildWindow(window)
+
+    local offset = 0
+    
+    local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title");
+    window:addChildWindow(descriptionTitle)
+    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
+    descriptionTitle:setProperty("VertFormatting", "TopAligned")
+    descriptionTitle:setText("Description:")
+    descriptionTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+    descriptionTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    height = getStaticTextWindowHeight(descriptionTitle)
+    descriptionTitle:setHeight(CEGUI.UDim(0, height))
+    offset = offset + height
+
+    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description");
+    window:addChildWindow(description)
+    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
+    description:setProperty("VertFormatting", "TopAligned")
+    description:setText(orxonox.QuestManager:getInstance():getDescription(hint):getDescription())
+    description:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
+    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    height = getStaticTextWindowHeight(description)
+    description:setHeight(CEGUI.UDim(0, height))
+
+    local window = winMgr:getWindow("orxonox/QuestGUI/Background")
+    window:addChildWindow(details)
+end
+
+function P.closeHintDetails_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+    local match = string.gmatch(name, "%d+")
+    match()
+    match()
+    match()
+    local detailsNr = tonumber(match())
+
+    winMgr:destroyWindow(P.detailsWindows[detailsNr])
+    P.detailsWindows[detailsNr] = nil
 end
 
Index: code/trunk/data/gui/scripts/SettingsMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/SettingsMenu.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/SettingsMenu.lua	(revision 7163)
@@ -24,7 +24,6 @@
 end
 
-function P.SettingsResetSettingsButton_clicked(e)
-    -- reset settings
-    logMessage(0, "event: reset settings")
+function P.SettingsMiscellaneousButton_clicked(e)
+    showMenuSheet("MiscConfigMenu", true)
 end
 
Index: code/trunk/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 6906)
+++ code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 7163)
@@ -27,4 +27,5 @@
         end
     end
+
 end
 
