[Orxonox-commit 1432] r6150 - in code/branches/presentation2: . data/defaultConfig data/gui/layouts data/gui/scripts src/libraries/core src/libraries/core/input src/modules/overlays src/modules/weapons/weaponmodes src/orxonox/gamestates src/orxonox/pickup src/orxonox/weaponsystem

scheusso at orxonox.net scheusso at orxonox.net
Wed Nov 25 16:52:38 CET 2009


Author: scheusso
Date: 2009-11-25 16:52:37 +0100 (Wed, 25 Nov 2009)
New Revision: 6150

Added:
   code/branches/presentation2/data/gui/layouts/DecisionPopup.layout
   code/branches/presentation2/data/gui/layouts/InGameMenu.layout
   code/branches/presentation2/data/gui/layouts/MainMenuBackground.layout
   code/branches/presentation2/data/gui/layouts/NewAudioMenu.layout
   code/branches/presentation2/data/gui/layouts/NewControlsMenu.layout
   code/branches/presentation2/data/gui/layouts/NewCreditsMenu.layout
   code/branches/presentation2/data/gui/layouts/NewGameplayMenu.layout
   code/branches/presentation2/data/gui/layouts/NewGraphicsMenu.layout
   code/branches/presentation2/data/gui/layouts/NewMainMenu.layout
   code/branches/presentation2/data/gui/layouts/NewMouseControlsMenu.layout
   code/branches/presentation2/data/gui/layouts/NewMultiplayerMenu.layout
   code/branches/presentation2/data/gui/layouts/NewSettingsMenu.layout
   code/branches/presentation2/data/gui/layouts/NewSingleplayerMenu.layout
   code/branches/presentation2/data/gui/scripts/DecisionPopup.lua
   code/branches/presentation2/data/gui/scripts/GUITools.lua
   code/branches/presentation2/data/gui/scripts/InGameMenu.lua
   code/branches/presentation2/data/gui/scripts/NewAudioMenu.lua
   code/branches/presentation2/data/gui/scripts/NewControlsMenu.lua
   code/branches/presentation2/data/gui/scripts/NewCreditsMenu.lua
   code/branches/presentation2/data/gui/scripts/NewGameplayMenu.lua
   code/branches/presentation2/data/gui/scripts/NewGraphicsMenu.lua
   code/branches/presentation2/data/gui/scripts/NewMainMenu.lua
   code/branches/presentation2/data/gui/scripts/NewMouseControlsMenu.lua
   code/branches/presentation2/data/gui/scripts/NewMultiplayerMenu.lua
   code/branches/presentation2/data/gui/scripts/NewSettingsMenu.lua
   code/branches/presentation2/data/gui/scripts/NewSingleplayerMenu.lua
Modified:
   code/branches/presentation2/
   code/branches/presentation2/data/defaultConfig/keybindings.ini
   code/branches/presentation2/data/gui/layouts/MainMenu.layout
   code/branches/presentation2/data/gui/layouts/QuestGUI.layout
   code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua
   code/branches/presentation2/data/gui/scripts/MainMenu.lua
   code/branches/presentation2/src/libraries/core/CMakeLists.txt
   code/branches/presentation2/src/libraries/core/GUIManager.cc
   code/branches/presentation2/src/libraries/core/GUIManager.h
   code/branches/presentation2/src/libraries/core/Game.cc
   code/branches/presentation2/src/libraries/core/Game.h
   code/branches/presentation2/src/libraries/core/GameState.cc
   code/branches/presentation2/src/libraries/core/LuaState.cc
   code/branches/presentation2/src/libraries/core/LuaState.h
   code/branches/presentation2/src/libraries/core/input/InputManager.h
   code/branches/presentation2/src/modules/overlays/GUIOverlay.cc
   code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.cc
   code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc
   code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h
   code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc
   code/branches/presentation2/src/orxonox/gamestates/GSLevel.h
   code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
   code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc
   code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc
   code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
   code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h
Log:
merged menu branch to presentation2 branch with some additional fixes and features ;)



Property changes on: code/branches/presentation2
___________________________________________________________________
Modified: svn:mergeinfo
   - /code/branches/console:5941-6104
/code/branches/core5:5768-5928,6009
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/particles2:6050-6106,6109
/code/branches/resource2:3372-5694
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
code/branches/buildsystem:1874-2276,2278-2400
code/branches/buildsystem2:2506-2658
code/branches/buildsystem3:2662-2708
code/branches/ceguilua:1802-1808
code/branches/core3:1572-1739
code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
code/branches/gametypes:2826-3031
code/branches/gcc43:1580
code/branches/gui:1635-1723,2795-2894
code/branches/input:1629-1636
code/branches/lodfinal:2372-2411
code/branches/map:2801-3086,3089
code/branches/miniprojects:2754-2824
code/branches/netp2:2835-2988
code/branches/netp3:2988-3082
code/branches/netp6:3214-3302
code/branches/network:2356
code/branches/network64:2210-2355
code/branches/objecthierarchy:1911-2085,2100,2110-2169
code/branches/objecthierarchy2:2171-2479
code/branches/overlay:2117-2385
code/branches/particles:2829-3085
code/branches/pch:3113-3194
code/branches/physics:1912-2055,2107-2439
code/branches/physics_merge:2436-2457
code/branches/pickups:1926-2086,2127,2827-2915
code/branches/pickups2:2107-2497,2915-3071
code/branches/presentation:2369-2652,2654-2660
code/branches/questsystem:1894-2088
code/branches/questsystem2:2107-2259
code/branches/questsystem5:2776-2905
code/branches/resource:3327-3366
code/branches/script_trigger:1295-1953,1955
code/branches/sound:2829-3010
code/branches/weapon:1925-2094
code/branches/weapon2:2107-2488
code/branches/weapons:2897-3051
code/branches/weaponsystem:2742-2890
   + /code/branches/console:5941-6104
/code/branches/core5:5768-5928,6009
/code/branches/ingamemenu:6000-6023
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/menu:5941-6146,6148
/code/branches/particles2:6050-6106,6109
/code/branches/resource2:3372-5694
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
code/branches/buildsystem:1874-2276,2278-2400
code/branches/buildsystem2:2506-2658
code/branches/buildsystem3:2662-2708
code/branches/ceguilua:1802-1808
code/branches/core3:1572-1739
code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
code/branches/gametypes:2826-3031
code/branches/gcc43:1580
code/branches/gui:1635-1723,2795-2894
code/branches/input:1629-1636
code/branches/lodfinal:2372-2411
code/branches/map:2801-3086,3089
code/branches/miniprojects:2754-2824
code/branches/netp2:2835-2988
code/branches/netp3:2988-3082
code/branches/netp6:3214-3302
code/branches/network:2356
code/branches/network64:2210-2355
code/branches/objecthierarchy:1911-2085,2100,2110-2169
code/branches/objecthierarchy2:2171-2479
code/branches/overlay:2117-2385
code/branches/particles:2829-3085
code/branches/pch:3113-3194
code/branches/physics:1912-2055,2107-2439
code/branches/physics_merge:2436-2457
code/branches/pickups:1926-2086,2127,2827-2915
code/branches/pickups2:2107-2497,2915-3071
code/branches/presentation:2369-2652,2654-2660
code/branches/questsystem:1894-2088
code/branches/questsystem2:2107-2259
code/branches/questsystem5:2776-2905
code/branches/resource:3327-3366
code/branches/script_trigger:1295-1953,1955
code/branches/sound:2829-3010
code/branches/weapon:1925-2094
code/branches/weapon2:2107-2488
code/branches/weapons:2897-3051
code/branches/weaponsystem:2742-2890

Modified: code/branches/presentation2/data/defaultConfig/keybindings.ini
===================================================================
--- code/branches/presentation2/data/defaultConfig/keybindings.ini	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/data/defaultConfig/keybindings.ini	2009-11-25 15:52:37 UTC (rev 6150)
@@ -22,7 +22,7 @@
 KeyE="scale -1 rotateRoll"
 KeyEnd=boost
 KeyEquals=
-KeyEscape="exit"
+KeyEscape="keyESC"
 KeyF="scale -1 moveUpDown"
 KeyF1="OverlayGroup toggleVisibility Debug"
 KeyF10=

Copied: code/branches/presentation2/data/gui/layouts/DecisionPopup.layout (from rev 6146, code/branches/menu/data/gui/layouts/DecisionPopup.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/DecisionPopup.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/DecisionPopup.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="orxonox/DecisionPopup_RootWindow" >
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="TaharezLook/StaticImage" Name="orxonox/DecisionPopup_Background" >
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+            <Property Name="Alpha" Value="0.5" />
+            <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_yes" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Yes" />
+                <Property Name="Alpha" Value="0.7" />
+                <Property Name="InheritsAlpha" Value="False" /> 
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.55,0},{0.45,0},{0.6,0}}" />
+                <Event Name="Clicked" Function="DecisionPopup.button_yes"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_no" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="No" />
+                <Property Name="Alpha" Value="0.8" />
+                <Property Name="InheritsAlpha" Value="False" /> 
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.55,0},{0.7,0},{0.6,0}}" />
+                <Event Name="Clicked" Function="DecisionPopup.button_no"/>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/DecisionPopup_text" >
+                <Property Name="Text" Value="Template text" />
+                <Property Name="HorzFormatting" Value="WordWrapCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.4,0},{0.8,0},{0.5,0}}" />
+                <Property Name="InheritsAlpha" Value="False" /> 
+                <Property Name="Alpha" Value="0.8" />
+            </Window>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/InGameMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/InGameMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/InGameMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/InGameMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="orxonox/InGameMenu_RootWindow" >
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_MainMenuButton" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="Text" Value="MainMenu" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2,0},{0.6,0},{0.3,0}}" />
+            <Property Name="Alpha" Value="0.7" />
+            <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_QuitButton" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="Text" Value="Quit" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.6,0},{0.5,0}}" />
+            <Property Name="Alpha" Value="0.7" />
+            <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_ReturnButton" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="Text" Value="return to Game" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6,0},{0.6,0},{0.7,0}}" />
+            <Property Name="Alpha" Value="0.7" />
+            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Modified: code/branches/presentation2/data/gui/layouts/MainMenu.layout
===================================================================
--- code/branches/presentation2/data/gui/layouts/MainMenu.layout	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/data/gui/layouts/MainMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -1,11 +1,7 @@
 <?xml version="1.0" ?>
 <GUILayout>
-    <Window Type="TaharezLook/StaticImage" Name="orxonox/Background">
-    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
-    <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
-    <Property Name="FrameEnabled" Value="set:true"/>
-    <Property Name="BackgroundEnabled" Value="set:false"/>
- 
+    <Window Type="DefaultWindow" Name="orxonox/MainMenuRootWindow">
+    <Property Name="InheritsAlpha" Value="false"/>
         <Window Type="TaharezLook/Button" Name="orxonox/StandaloneButton">
             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.3,0}}"/>
             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>

Copied: code/branches/presentation2/data/gui/layouts/MainMenuBackground.layout (from rev 6146, code/branches/menu/data/gui/layouts/MainMenuBackground.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/MainMenuBackground.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/MainMenuBackground.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<GUILayout>
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/Background">
+    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
+    <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
+    <Property Name="FrameEnabled" Value="set:true"/>
+    <Property Name="BackgroundEnabled" Value="set:false"/>
+    <Property Name="InheritsAlpha" Value="False" />
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewAudioMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewAudioMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewAudioMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewAudioMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/AudioBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/AudioWindow" >
+            <Property Name="Text" Value="Audio" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="orxonox/MusicVolume" >
+                <Property Name="Text" Value="Music volume" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.45,0}}" />
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MusicScrollbar" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="StepSize" Value="0.1" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.98,0},{0.8,0}}" />
+                    <Event Name="ScrollPosChanged" Function="NewAudioMenu.AudioMusicScrollbar_clicked"/>
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/SoundVolume" >
+                <Property Name="Text" Value="Sound volume" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.55,0},{0.95,0},{0.8,0}}" />
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/SoundScrollbar" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="StepSize" Value="0.1" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.98,0},{0.8,0}}" />
+                    <Event Name="ScrollPosChanged" Function="NewAudioMenu.AudioSoundScrollbar_clicked"/>
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/Checkbox" Name="orxonox/MusicCheckbox" >
+                <Property Name="Text" Value="Mute music" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.85,0},{0.45,0},{0.95,0}}" />
+                <Event Name="CheckStateChanged" Function="NewAudioMenu.AudioMuteMusicCheckbox_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Checkbox" Name="orxonox/SoundCheckbox" >
+                <Property Name="Text" Value="Mute sound" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.85,0},{0.85,0},{0.95,0}}" />
+                <Event Name="CheckStateChanged" Function="NewAudioMenu.AudioMuteSoundCheckbox_clicked"/>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/AudioBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewAudioMenu.AudioBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewControlsMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewControlsMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewControlsMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewControlsMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/ControlsBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/ControlsWindow" >
+            <Property Name="Text" Value="Controls" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsButton" >
+                <Property Name="Text" Value="Mouse controls" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.318181,0},{0.7,0},{0.5,0}}" />
+                <Event Name="Clicked" Function="NewControlsMenu.ControlsMouseControlsButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/KeyboardControlsButton" >
+                <Property Name="Text" Value="Keyboard controls" />
+                <Property Name="Disabled" Value="True" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.590909,0},{0.7,0},{0.772727,0}}" />
+                <Event Name="Clicked" Function="NewControlsMenu.ControlsKeyboardControlsButton_clicked"/>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/ControlsBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewControlsMenu.ControlsBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewCreditsMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewCreditsMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewCreditsMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewCreditsMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/CreditsBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsWindow" >
+            <Property Name="Text" Value="Credits" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsText" >
+                <Property Name="Text">Orxonox version 0.0.3
+
+Programming Language:  C++ - lua - tcl
+Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE
+Licence:  GNU General Public Licence - Creative Commons
+
+http://www.orxonox.net</Property>
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.9,0}}" />
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/CreditsBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewCreditsMenu.CreditsBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewGameplayMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewGameplayMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewGameplayMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewGameplayMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/GameplayBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/GameplayWindow" >
+            <Property Name="Text" Value="Gameplay" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="orxonox/Difficulty" >
+                <Property Name="Text" Value="Difficulty" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.475,0},{0.9,0}}" />
+                <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyEasyButton" >
+                    <Property Name="Text" Value="Easy" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.325,0},{0.325,0},{0.675,0},{0.45,0}}" />
+                    <Event Name="SelectStateChanged" Function="NewGameplayMenu.GameplayDifficultyEasyButton_clicked"/>
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyNormalButton" >
+                    <Property Name="Text" Value="Normal" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.325,0},{0.525,0},{0.675,0},{0.65,0}}" />
+                    <Event Name="SelectStateChanged" Function="NewGameplayMenu.GameplayDifficultyNormalButton_clicked"/>
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyHardButton" >
+                    <Property Name="Text" Value="Hard" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.325,0},{0.725,0},{0.675,0},{0.85,0}}" />
+                    <Event Name="SelectStateChanged" Function="NewGameplayMenu.GameplayDifficultyHardButton_clicked"/>
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/Theme" >
+                <Property Name="Text" Value="Theme" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.2,0},{0.95,0},{0.9,0}}" />
+                <Window Type="TaharezLook/Combobox" Name="orxonox/ThemeCombobox" >
+                    <Property Name="AlwaysOnTop" Value="True" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.21,0},{0.95,0},{0.9,0}}" />
+                    <Property Name="MaxEditTextLength" Value="1073741823" />
+                    <Property Name="ReadOnly" Value="True" />
+                </Window>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/GameplayBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewGameplayMenu.GameplayBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewGraphicsMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewGraphicsMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewGraphicsMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewGraphicsMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/GraphicsBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsWindow" >
+            <Property Name="Text" Value="Graphics" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="orxonox/Resolution" >
+                <Property Name="Text" Value="Resolution" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.475,0},{0.9,0}}" />
+                <Window Type="TaharezLook/Combobox" Name="orxonox/ResolutionCombobox" >
+                    <Property Name="ReadOnly" Value="True" />
+                    <Property Name="AlwaysOnTop" Value="True" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.21,0},{0.95,0},{0.9,0}}" />
+                    <Property Name="MaxEditTextLength" Value="1073741823" />
+                </Window>
+                <Window Type="TaharezLook/Checkbox" Name="orxonox/FullscreenCheckbox" >
+                    <Property Name="Text" Value="Fullscreen" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.275,0},{0.725,0},{0.725,0},{0.85,0}}" />
+                    <Event Name="CheckStateChanged" Function="NewGraphicsMenu.GraphicsFullscreenCheckbox_clicked"/>
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/Brightness" >
+                <Property Name="Text" Value="Brightness" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.2,0},{0.95,0},{0.45,0}}" />
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/BrightnessScrollbar" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="0.1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.6,0},{0.95,0},{0.8,0}}" />
+                    <Event Name="ScrollPosChanged" Function="NewGraphicsMenu.GraphicsBrightnessScrollbar_clicked" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsInfo" >
+                <Property Name="Text" >Changes in graphics
+settings require
+a game restart.</Property>
+                <Property Name="TextColours" Value="FF4444FF" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.55,0},{0.95,0},{0.9,0}}" />
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/GraphicsBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewGraphicsMenu.GraphicsBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewMainMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewMainMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewMainMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewMainMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/MainMenuBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.02125,0},{1.02167,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/Button" Name="orxonox/QuickGameTestButton" >
+            <Property Name="Text" Value="QUICK GAME TEST" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.25,0},{0.6,0},{0.3,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.QuickGameTestButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerButton" >
+            <Property Name="Text" Value="Singleplayer" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.325,0},{0.6,0},{0.375,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.SingleplayerButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerButton" >
+            <Property Name="Text" Value="Multiplayer" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.6,0},{0.45,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.MultiplayerButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/SettingsButton" >
+            <Property Name="Text" Value="Settings" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.475,0},{0.6,0},{0.525,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.SettingsButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/CreditsButton" >
+            <Property Name="Text" Value="Credits" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.55,0},{0.6,0},{0.6,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.CreditsButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/ExitButton" >
+            <Property Name="Text" Value="Exit" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewMainMenu.ExitButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewMouseControlsMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewMouseControlsMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewMouseControlsMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewMouseControlsMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/MouseControlsBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/MouseControlsWindow" >
+            <Property Name="Text" Value="Mouse controls" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="orxonox/MouseSensitivity" >
+                <Property Name="Text" Value="Mouse sensitivity" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.45,0}}" />
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MouseScrollbar" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="StepSize" Value="0.1" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.98,0},{0.8,0}}" />
+                    <Event Name="ScrollPosChanged" Function="NewMouseControlsMenu.MouseControlsMouseScrollbar_clicked" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="orxonox/MouseControlMode" >
+                <Property Name="Text" Value="Mouse control mode" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.55,0},{0.95,0},{0.9,0}}" />
+                <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseControlButton1" >
+                    <Property Name="Text" Value="Default control mode" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.03,0},{0.6,0},{0.47,0},{0.8,0}}" />
+                    <Event Name="SelectStateChanged" Function="NewMouseControlsMenu.MouseControlsDefaultButton_clicked" />
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseControlButton2" >
+                    <Property Name="Text" Value=".............................................." />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.53,0},{0.6,0},{0.97,0},{0.8,0}}" />
+                    <Event Name="SelectStateChanged" Function="NewMouseControlsMenu.MouseControls_______Button_clicked" />
+                </Window>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewMouseControlsMenu.MouseControlsBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewMultiplayerMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewMultiplayerMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewMultiplayerMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewMultiplayerMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/MultiplayerBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/MultiplayerWindow" >
+            <Property Name="Text" Value="Multiplayer" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/Listbox" Name="orxonox/MultiplayerLevelListbox" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.8,0}}" />
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerJoinButton" >
+                <Property Name="Text" Value="Join" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.85,0},{0.3,0},{0.95,0}}" />
+                <Event Name="SelectStateChanged" Function="NewMultiplayerMenu.MultiplayerJoinButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerHostButton" >
+                <Property Name="Text" Value="Host" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.85,0},{0.6,0},{0.95,0}}" />
+                <Event Name="SelectStateChanged" Function="NewMultiplayerMenu.MultiplayerHostButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerDedicatedButton" >
+                <Property Name="Text" Value="Dedicated" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.7,0},{0.85,0},{0.9,0},{0.95,0}}" />
+                <Event Name="SelectStateChanged" Function="NewMultiplayerMenu.MultiplayerDedicatedButton_clicked"/>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerStartButton" >
+            <Property Name="Text" Value="Start" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.625,0},{0.4875,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewMultiplayerMenu.MultiplayerStartButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.625,0},{0.7125,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewMultiplayerMenu.MultiplayerBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewSettingsMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewSettingsMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewSettingsMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewSettingsMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/SettingsBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+
+        <Window Type="TaharezLook/StaticText" Name="orxonox/SettingsWindow" >
+            <Property Name="Text" Value="Settings" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/Button" Name="orxonox/GameplayButton" >
+                <Property Name="Text" Value="Gameplay" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.181818,0},{0.45,0},{0.363636,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsGameplayButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerOptionsButton" >
+                <Property Name="Text" Value="Multiplayer options" />
+                <Property Name="Disabled" Value="True" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.454545,0},{0.45,0},{0.636363,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsMultiplayerOptionsButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/ControlsButton" >
+                <Property Name="Text" Value="Controls" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.727272,0},{0.45,0},{0.909090,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsControlsButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/GraphicsButton" >
+                <Property Name="Text" Value="Graphics" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.181818,0},{0.95,0},{0.363636,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsGraphicsButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/AudioButton" >
+                <Property Name="Text" Value="Audio" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.454545,0},{0.95,0},{0.636363,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsAudioButton_clicked"/>
+            </Window>
+            <Window Type="TaharezLook/Button" Name="orxonox/ResetSettingsButton" >
+                <Property Name="Text" Value="Reset settings" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.727272,0},{0.95,0},{0.909090,0}}" />
+                <Event Name="Clicked" Function="NewSettingsMenu.SettingsResetSettingsButton_clicked"/>
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/SettingsBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewSettingsMenu.SettingsBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Copied: code/branches/presentation2/data/gui/layouts/NewSingleplayerMenu.layout (from rev 6146, code/branches/menu/data/gui/layouts/NewSingleplayerMenu.layout)
===================================================================
--- code/branches/presentation2/data/gui/layouts/NewSingleplayerMenu.layout	                        (rev 0)
+++ code/branches/presentation2/data/gui/layouts/NewSingleplayerMenu.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="TaharezLook/StaticImage" Name="orxonox/SingleplayerBackground" >
+        <Property Name="Image" Value="set:MainMenuBackground image:Background" />
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="TaharezLook/StaticText" Name="orxonox/SingleplayerWindow" >
+            <Property Name="Text" Value="Singleplayer" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" />
+            <Window Type="TaharezLook/Listbox" Name="orxonox/SingleplayerLevelListbox" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.9,0}}" />
+            </Window>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerStartButton" >
+            <Property Name="Text" Value="Start" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.625,0},{0.4875,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewSingleplayerMenu.SingleplayerStartButton_clicked"/>
+        </Window>
+        <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerBackButton" >
+            <Property Name="Text" Value="Back" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.625,0},{0.7125,0},{0.675,0}}" />
+            <Event Name="Clicked" Function="NewSingleplayerMenu.SingleplayerBackButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>

Modified: code/branches/presentation2/data/gui/layouts/QuestGUI.layout
===================================================================
--- code/branches/presentation2/data/gui/layouts/QuestGUI.layout	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/data/gui/layouts/QuestGUI.layout	2009-11-25 15:52:37 UTC (rev 6150)
@@ -5,6 +5,7 @@
     <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
     <Property Name="FrameEnabled" Value="set:true"/>
     <Property Name="BackgroundEnabled" Value="set:false"/>
+    <Property Name="InheritsAlpha" Value="False" />
 
         <Window Type="TaharezLook/Titlebar" Name="orxonox/QuestGUI/Title">
             <Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}"/>

Copied: code/branches/presentation2/data/gui/scripts/DecisionPopup.lua (from rev 6146, code/branches/menu/data/gui/scripts/DecisionPopup.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/DecisionPopup.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/DecisionPopup.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,41 @@
+-- DecisionPopup.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    DecisionPopup = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "DecisionPopup"
+P.layoutString = "DecisionPopup.layout"
+
+function P:init()
+end
+
+function P.setCallback(functionPtr)
+    P.functionPtr = functionPtr
+end
+
+function P.setText( text )
+    winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text )
+end
+
+-- events for ingamemenu
+function P.button_yes(e)
+    if P.functionPtr ~= nil then
+        P.functionPtr(true)
+    end
+    orxonox.CommandExecutor:execute("hideGUI DecisionPopup")
+end
+
+function P.button_no(e)
+    if P.functionPtr ~= nil then
+        P.functionPtr(false)
+    end
+    orxonox.CommandExecutor:execute("hideGUI DecisionPopup")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/GUITools.lua (from rev 6146, code/branches/menu/data/gui/scripts/GUITools.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/GUITools.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/GUITools.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,6 @@
+function openDecisionPopup( text, callbackPtr )
+    orxonox.CommandExecutor:execute("showGUI DecisionPopup false true")
+--     showGUI("DecisionPopup", false, true)
+    DecisionPopup.setCallback(InGameMenu.callback)
+    DecisionPopup.setText(text)
+end
\ No newline at end of file

Copied: code/branches/presentation2/data/gui/scripts/InGameMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/InGameMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/InGameMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/InGameMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,42 @@
+-- InGameMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    InGameMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "InGameMenu"
+P.layoutString = "InGameMenu.layout"
+
+function P:init()
+end
+
+
+-- events for ingamemenu
+function P.button_quit_clicked(e)
+    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
+end
+
+function P.button_mainmenu_clicked(e)
+    orxonox.Game:getInstance():popState()
+    orxonox.Game:getInstance():popState()
+    orxonox.Game:getInstance():requestState("mainmenu")
+    orxonox.CommandExecutor:execute("hideGUI InGameMenu")
+end
+
+function P.button_return_clicked(e)
+    orxonox.CommandExecutor:execute("hideGUI InGameMenu")
+end
+
+function P.callback(doExit)
+    if doExit then
+        orxonox.CommandExecutor:execute("hideGUI InGameMenu")
+        orxonox.CommandExecutor:execute("exit")
+    end
+end
+
+return P
+

Modified: code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -13,7 +13,16 @@
 system:setDefaultTooltip("TaharezLook/Tooltip")
 
 loadedGUIs = {}
+cursorVisibility = {}
+activeSheets = {}
+nrOfActiveSheets = 0
+root = nil
+bShowsCursor = false
+bHidePrevious = {}
 
+-- Require all tools
+require("GUITools")
+
 -- loads the GUI with the specified filename
 -- be sure to set the global variable "filename" before calling this function
 function loadGUI(filename)
@@ -21,12 +30,14 @@
     loadedGui = loadedGUIs[filename]
     if loadedGui == nil then
         loadedGuiNS = require(filename)
+        if loadedGuiNS == nil then
+            return
+        end
         loadedGui = loadedGuiNS:load()
         loadedGUIs[filename] = loadedGui
         -- if there has no GUI been loaded yet, set new GUI as current
         if table.getn(loadedGUIs) == 1 then
             current = loadedGUIs[1]
-            showing = false
         end
         -- hide new GUI as we do not want to show it accidentially
         loadedGui:hide()
@@ -34,51 +45,166 @@
     return loadedGui
 end
 
-function showGUI(filename, ptr)
-    gui = showGUI(filename)
+function showGUI(filename, hidePrevious, bCursorVisible, ptr)
+    gui = showGUI(filename, hidePrevious, bCursorVisible)
     gui.overlay = ptr
 end
 
 -- shows the specified and loads it if not loaded already
 -- be sure to set the global variable "filename" before calling this function
-function showGUI(filename)
-    if current == nil or current.filename ~= filename then
-        current = loadedGUIs[filename]
-        if current == nil then
-            current = loadGUI(filename)
-        end
-        system:setGUISheet(current.window)
+function showGUI(filename, hidePrevious, bCursorVisible)
+    if bCursorVisible == nil then
+        bCursorVisible = true
     end
-    current:show()
-    showing = true
-    return current
-end
 
-function toggleGUI()
-    if showing == true then
-        current:hide()
-        cursor:hide()
-        showing = false
+    if root == nil then
+        setBackground("")
+    end
+
+    local currentGUI = loadedGUIs[filename]
+    if(currentGUI == nil) then
+        currentGUI = loadGUI(filename)
+    end
+
+    if(root:isChild(currentGUI.window)) then
+        root:removeChildWindow(currentGUI.window)
+    end
+    root:addChildWindow(currentGUI.window)
+
+    if bCursorVisible then
+        showCursor()
     else
-        current:show()
-        cursor:show()
-        showing = true
+        hideCursor()
     end
-    return showing
+    
+    if find( activeSheets, filename ) ~= nil then
+        table.remove( activeSheets, find( activeSheets, filename ) )
+        nrOfActiveSheets = nrOfActiveSheets - 1
+    else
+        if nrOfActiveSheets == 0 then
+            orxonox.InputManager:getInstance():enterState("guiMouseOnly")
+        end
+    end
+    nrOfActiveSheets = nrOfActiveSheets + 1
+    table.insert(activeSheets, filename)
+    activeSheets[nrOfActiveSheets] = filename
+    bHidePrevious[filename]=hidePrevious
+    cursorVisibility[filename] = bCursorVisible
+    
+    if hidePrevious == true then
+        for i=1,nrOfActiveSheets-1 do
+            loadedGUIs[ activeSheets[i] ]:hide()
+        end
+    end
+    currentGUI:show()
+    return currentGUI
 end
 
 function hideCursor()
-    cursor:hide()
+    if bShowsCursor==true then
+        bShowsCursor=false
+        cursor:hide()
+    end
 end
 
 function showCursor()
-    cursor:show()
+    if bShowsCursor==false then
+        bShowsCursor=true
+        cursor:show()
+    end
 end
 
 function hideGUI(filename)
-    current = loadedGUIs[filename]
-    if current ~= nil then
-        current:hide()
-        showing = false
+    local currentGUI = loadedGUIs[filename]
+    if currentGUI == nil then
+        return
     end
+    currentGUI:hide()
+    if bHidePrevious[filename] == true then
+        local i = nrOfActiveSheets-1
+        while i>0 do
+            loadedGUIs[ activeSheets[i] ]:show()
+            if bHidePrevious[filename]==true then
+                break
+            else
+                i=i-1
+            end
+        end
+    end
+    root:removeChildWindow(currentGUI.window)
+    local i=1
+    while activeSheets[i] do
+        if activeSheets[i+1] == nil then
+            if activeSheets[i-1] ~= nil then
+                if cursorVisibility[ activeSheets[i-1] ] == true then
+                    showCursor()
+                else
+                    hideCursor()
+                end
+            else
+                hideCursor()
+            end
+        end
+        if activeSheets[i] == filename then
+            table.remove( activeSheets, i )
+            nrOfActiveSheets = nrOfActiveSheets-1
+        else
+            i = i+1
+        end
+    end
+    cursorVisibility[filename] = nil -- remove the cursor visibility of the current gui from the table
+    bHidePrevious[filename] = nil
+    if nrOfActiveSheets == 0 then
+        orxonox.InputManager:getInstance():leaveState("guiMouseOnly")
+        hideCursor()
+    end
 end
+
+function keyESC()
+    if nrOfActiveSheets > 0 then
+        orxonox.CommandExecutor:execute("hideGUI "..activeSheets[nrOfActiveSheets])
+    else
+        showGUI("InGameMenu")
+    end
+end
+
+function setBackground(filename)
+    local newroot
+    if root ~= nil then
+        root:rename("oldRootWindow")
+    end
+    if filename ~= "" then
+        newroot = winMgr:loadWindowLayout(filename .. ".layout")
+        newroot:rename("AbsoluteRootWindow")
+        system:setGUISheet(newroot)
+    else
+        newroot = winMgr:createWindow("DefaultWindow", "AbsoluteRootWindow")
+        newroot:setProperty("Alpha", "0.0")
+        newroot:setSize(CEGUI.UVector2(CEGUI.UDim(1.0,0),CEGUI.UDim(1.0,0)))
+        system:setGUISheet(newroot)
+    end
+    if root ~= nil then
+        local child
+        while root:getChildCount()~=0 do
+            debug(root:getChildCount())
+            child = root:getChildAtIdx(0)
+            root:removeChildWindow(child)
+            newroot:addChildWindow(child)
+        end
+        winMgr:destroyWindow(root)
+    end
+    newroot:show()
+    root = newroot
+end
+
+function find(table, value)
+    local i=0
+    while table[i] ~= nil do
+        if table[i]==value then
+            return i
+        else
+            i=i+1
+        end
+    end
+    return nil
+end

Modified: code/branches/presentation2/data/gui/scripts/MainMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/MainMenu.lua	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/data/gui/scripts/MainMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -49,7 +49,7 @@
     if choice then
         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
         orxonox.CommandExecutor:execute("startGame")
-        toggleGUI()
+        hideGUI(P.filename)
     end
 end
 
@@ -58,7 +58,7 @@
     if choice then
         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
         orxonox.CommandExecutor:execute("startServer")
-        toggleGUI()
+        hideGUI(P.filename)
     end
 end
 
@@ -67,7 +67,7 @@
     if choice then
         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
         orxonox.CommandExecutor:execute("startDedicated")
-        toggleGUI()
+        hideGUI(P.filename)
     end
 end
 
@@ -76,7 +76,8 @@
     if choice then
         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
         orxonox.CommandExecutor:execute("startClient")
-        toggleGUI()
+        hideGUI(P.filename)
+
     end
 end
 

Copied: code/branches/presentation2/data/gui/scripts/NewAudioMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewAudioMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewAudioMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewAudioMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,40 @@
+-- NewAudioMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewAudioMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewAudioMenu"
+P.layoutString = "NewAudioMenu.layout"
+
+function P.AudioMusicScrollbar_clicked(e)
+    -- music volume
+    debug("event: music volume")
+end
+
+function P.AudioSoundScrollbar_clicked(e)
+    -- sound volume
+    debug("event: sound volume")
+end
+
+function P.AudioMuteMusicCheckbox_clicked(e)
+    -- mute music
+    debug("event: mute music")
+end
+
+function P.AudioMuteSoundCheckbox_clicked(e)
+    -- mute sound
+    debug("event: mute sound")
+end
+
+function P.AudioBackButton_clicked(e)
+    hideGUI("NewAudioMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewControlsMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewControlsMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewControlsMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewControlsMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,30 @@
+-- NewControlsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewControlsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewControlsMenu"
+P.layoutString = "NewControlsMenu.layout"
+
+function P.ControlsMouseControlsButton_clicked(e)
+    showGUI("NewMouseControlsMenu")
+    debug("event: MOUSE CONTROLS")
+end
+
+function P.ControlsKeyboardControlsButton_clicked(e)
+    showGUI("NewKeyboardControlsMenu")
+    debug("event: KEYBOARD CONTROLS")
+end
+
+function P.ControlsBackButton_clicked(e)
+    hideGUI("NewControlsMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewCreditsMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewCreditsMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewCreditsMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewCreditsMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,20 @@
+-- NewCreditsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewCreditsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewCreditsMenu"
+P.layoutString = "NewCreditsMenu.layout"
+
+function P.CreditsBackButton_clicked(e)
+    hideGUI("NewCreditsMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewGameplayMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewGameplayMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewGameplayMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewGameplayMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,61 @@
+-- NewGameplayMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewGameplayMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewGameplayMenu"
+P.layoutString = "NewGameplayMenu.layout"
+
+function P:init()
+    dropdown = winMgr:getWindow("orxonox/ThemeCombobox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+      if level == "" then
+        break
+      end
+      table.insert(levelList, level)
+      index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toCombobox(dropdown):addItem(item)
+        if v .. ".oxw" == preselect then
+            dropdown:setItemSelectState(item, true)
+        end
+    end
+end
+
+function P.GameplayDifficultyEasyButton_clicked(e)
+    -- difficulty easy
+    debug("event: easy")
+end
+
+function P.GameplayDifficultyNormalButton_clicked(e)
+    -- difficulty normal
+    debug("event: normal")
+end
+
+function P.GameplayDifficultyHardButton_clicked(e)
+    -- difficulty hard
+    debug("event: hard")
+end
+
+function P.GameplayBackButton_clicked(e)
+    hideGUI("NewGameplayMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewGraphicsMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewGraphicsMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewGraphicsMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewGraphicsMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,56 @@
+-- NewGraphicsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewGraphicsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewGraphicsMenu"
+P.layoutString = "NewGraphicsMenu.layout"
+
+function P:init()
+    dropdown = winMgr:getWindow("orxonox/ResolutionCombobox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+      if level == "" then
+        break
+      end
+      table.insert(levelList, level)
+      index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toCombobox(dropdown):addItem(item)
+        if v .. ".oxw" == preselect then
+            dropdown:setItemSelectState(item, true)
+        end
+    end
+end
+
+function P.GraphicsFullscreenCheckbox_clicked(e)
+    -- fullscreen
+    debug("event: fullscreen")
+end
+
+function P.GraphicsBrightnessScrollbar_clicked(e)
+    -- brightness
+    debug("event: brightness")
+end
+
+function P.GraphicsBackButton_clicked(e)
+    hideGUI("NewGraphicsMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewMainMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewMainMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewMainMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewMainMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,46 @@
+-- NewMainMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewMainMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewMainMenu"
+P.layoutString = "NewMainMenu.layout"
+
+-- events for NewMainMenu
+function P.QuickGameTestButton_clicked(e)
+    orxonox.CommandExecutor:execute("startGame")
+    debug("event: quick game test")
+end
+
+function P.SingleplayerButton_clicked(e)
+    showGUI("NewSingleplayerMenu")
+    debug("event: SINGLEPLAYER")
+end
+
+function P.MultiplayerButton_clicked(e)
+    showGUI("NewMultiplayerMenu")
+    debug("event: MULTIPLAYER")
+end
+
+function P.SettingsButton_clicked(e)
+    showGUI("NewSettingsMenu")
+    debug("event: SETTINGS")
+end
+
+function P.CreditsButton_clicked(e)
+    showGUI("NewCreditsMenu")
+    debug("event: CREDITS")
+end
+
+function P.ExitButton_clicked(e)
+    orxonox.CommandExecutor:execute("exit")
+    debug("event: exit")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewMouseControlsMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewMouseControlsMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewMouseControlsMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewMouseControlsMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,35 @@
+-- NewMouseControlsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewMouseControlsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewMouseControlsMenu"
+P.layoutString = "NewMouseControlsMenu.layout"
+
+function P.MouseControlsMouseScrollbar_clicked(e)
+    -- mouse sensitivity
+    debug("event: mouse sensitivity")
+end
+
+function P.MouseControlsDefaultButton_clicked(e)
+    -- default control mode
+    debug("event: default control mode")
+end
+
+function P.MouseControls_______Button_clicked(e)
+    -- .......
+    debug("event: .......")
+end
+
+function P.MouseControlsBackButton_clicked(e)
+    hideGUI("NewMouseControlsMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewMultiplayerMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewMultiplayerMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewMultiplayerMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewMultiplayerMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,82 @@
+-- NewMultiplayerMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewMultiplayerMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewMultiplayerMenu"
+P.layoutString = "NewMultiplayerMenu.layout"
+
+function P:init()
+    listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+      if level == "" then
+        break
+      end
+      table.insert(levelList, level)
+      index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toListbox(listbox):addItem(item)
+        if v .. ".oxw" == preselect then
+            listbox:setItemSelectState(item, true)
+        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)
+    end
+    if multiplayerMode == "startDedicated" then
+	window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton")
+	button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+    end
+end
+
+function P.MultiplayerJoinButton_clicked(e)
+    multiplayerMode = "startClient"
+    debug("event: join")
+end
+
+function P.MultiplayerHostButton_clicked(e)
+    multiplayerMode = "startServer"
+    debug("event: host")
+end
+
+function P.MultiplayerDedicatedButton_clicked(e)
+    multiplayerMode = "startDedicated"
+    debug("event: dedicated")
+end
+
+function P.MultiplayerStartButton_clicked(e)
+    orxonox.CommandExecutor:execute(multiplayerMode)
+    debug("event: start")
+end
+
+function P.MultiplayerBackButton_clicked(e)
+    hideGUI("NewMultiplayerMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewSettingsMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewSettingsMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewSettingsMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewSettingsMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,50 @@
+-- NewSettingsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewSettingsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewSettingsMenu"
+P.layoutString = "NewSettingsMenu.layout"
+
+function P.SettingsGameplayButton_clicked(e)
+    showGUI("NewGameplayMenu")
+    debug("event: GAMEPLAY")
+end
+
+function P.SettingsMultiplayerOptionsButton_clicked(e)
+    showGUI("NewMultiplayerOptionsMenu")
+    debug("event: MULTIPLAYER OPTIONS")
+end
+
+function P.SettingsControlsButton_clicked(e)
+    showGUI("NewControlsMenu")
+    debug("event: CONTROLS")
+end
+
+function P.SettingsGraphicsButton_clicked(e)
+    showGUI("NewGraphicsMenu")
+    debug("event: GRAPHICS")
+end
+
+function P.SettingsAudioButton_clicked(e)
+    showGUI("NewAudioMenu")
+    debug("event: AUDIO")
+end
+
+function P.SettingsResetSettingsButton_clicked(e)
+    -- reset settings
+    debug("event: reset settings")
+end
+
+function P.SettingsBackButton_clicked(e)
+    hideGUI("NewSettingsMenu")
+    debug("event: back")
+end
+
+return P
+

Copied: code/branches/presentation2/data/gui/scripts/NewSingleplayerMenu.lua (from rev 6146, code/branches/menu/data/gui/scripts/NewSingleplayerMenu.lua)
===================================================================
--- code/branches/presentation2/data/gui/scripts/NewSingleplayerMenu.lua	                        (rev 0)
+++ code/branches/presentation2/data/gui/scripts/NewSingleplayerMenu.lua	2009-11-25 15:52:37 UTC (rev 6150)
@@ -0,0 +1,51 @@
+-- NewSingleplayerMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    NewSingleplayerMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "NewSingleplayerMenu"
+P.layoutString = "NewSingleplayerMenu.layout"
+
+function P:init()
+    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+      if level == "" then
+        break
+      end
+      table.insert(levelList, level)
+      index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toListbox(listbox):addItem(item)
+        if v .. ".oxw" == preselect then
+            listbox:setItemSelectState(item, true)
+        end
+    end
+end
+
+function P.SingleplayerStartButton_clicked(e)
+    -- start game
+    debug("event: start")
+end
+
+function P.SingleplayerBackButton_clicked(e)
+    hideGUI("NewSingleplayerMenu")
+    debug("event: back")
+end
+
+return P
+

Modified: code/branches/presentation2/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/libraries/core/CMakeLists.txt	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/CMakeLists.txt	2009-11-25 15:52:37 UTC (rev 6150)
@@ -85,8 +85,10 @@
   FIND_HEADER_FILES
   TOLUA_FILES
     CommandExecutor.h
+    Game.h
     Loader.h
     LuaState.h
+    input/InputManager.h
   DEFINE_SYMBOL
     "CORE_SHARED_BUILD"
   PCH_FILE

Modified: code/branches/presentation2/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/GUIManager.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/GUIManager.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -49,9 +49,13 @@
 #endif
 
 #include "util/Clock.h"
+#include "util/Convert.h"
 #include "util/Debug.h"
 #include "util/Exception.h"
 #include "util/OrxAssert.h"
+#include "ConsoleCommand.h"
+#include "Core.h"
+#include "input/InputManager.h"
 #include "LuaState.h"
 #include "PathConfig.h"
 #include "Resource.h"
@@ -84,6 +88,9 @@
 
     GUIManager* GUIManager::singletonPtr_s = 0;
 
+    SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, false).defaultValue(2, true);
+    SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User);
+
     /**
     @brief
         Constructs the GUIManager by starting up CEGUI
@@ -100,6 +107,7 @@
         : renderWindow_(renderWindow)
         , resourceProvider_(0)
         , camera_(NULL)
+        , bShowIngameGUI_(false)
     {
         using namespace CEGUI;
 
@@ -112,6 +120,9 @@
 
         // setup scripting
         luaState_.reset(new LuaState());
+        rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua", "GUI");
+        // This is necessary to ensure that input events also use the right resource info when triggering lua functions
+        luaState_->setDefaultResourceInfo(this->rootFileInfo_);
         scriptModule_.reset(new LuaScriptModule(luaState_->getInternalLuaState()));
 
         // Create our own logger to specify the filepath
@@ -126,7 +137,6 @@
         guiSystem_.reset(new System(guiRenderer_.get(), resourceProvider_, 0, scriptModule_.get()));
 
         // Initialise the basic Lua code
-        rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua", "GUI");
         this->luaState_->doFile("InitialiseGUI.lua", "GUI", false);
 
         // Align CEGUI mouse with OIS mouse
@@ -202,11 +212,72 @@
         The function executes the Lua function with the same name in case the GUIManager is ready.
         For more details check out loadGUI_2.lua where the function presides.
     */
-    void GUIManager::showGUI(const std::string& name)
+    /*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor)
     {
-        this->luaState_->doString("showGUI(\"" + name + "\")", rootFileInfo_);
+        std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
+        if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
+        {
+//             InputManager::getInstance().enterState("guiMouseOnly");
+        }
+        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
     }
 
+    /**
+    @brief
+        Hack-ish. Needed for GUIOverlay.
+    */
+    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor)
+    {
+        std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
+        if(this->showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
+        {
+//             this->executeCode("showCursor()");
+//             InputManager::getInstance().enterState("guiMouseOnly");
+        }
+        this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
+    }
+
+    /**
+    @brief
+        Hides specified GUI.
+    @param name
+        The name of the GUI.
+    */
+    /*static*/ void GUIManager::hideGUI(const std::string& name)
+    {
+        GUIManager::getInstance().showingGUIs_.erase(name);
+        GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
+        if(GUIManager::getInstance().showingGUIs_.size() == 0)
+        {
+//             GUIManager::getInstance().executeCode("hideCursor()");
+//             InputManager::getInstance().leaveState("guiMouseOnly");
+        }
+    }
+
+    void GUIManager::toggleIngameGUI()
+    {
+        if ( this->bShowIngameGUI_==false )
+        {
+            GUIManager::showGUI("InGameMenu");
+            this->bShowIngameGUI_ = true;
+        }
+        else
+        {
+            GUIManager::hideGUI("InGameMenu");
+            this->bShowIngameGUI_ = false;
+        }
+    }
+    
+    void GUIManager::keyESC()
+    {
+        this->executeCode("keyESC()");
+    }
+    
+    void GUIManager::setBackground(const std::string& name)
+    {
+        this->executeCode("setBackground(\"" + name + "\")");
+    }
+
     void GUIManager::keyPressed(const KeyEvent& evt)
     {
         guiSystem_->injectKeyDown(evt.getKeyCode());

Modified: code/branches/presentation2/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/presentation2/src/libraries/core/GUIManager.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/GUIManager.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -33,6 +33,7 @@
 #include "CorePrereqs.h"
 
 #include <map>
+#include <set>
 #include <string>
 #include <CEGUIForwardRefs.h>
 #include <boost/scoped_ptr.hpp>
@@ -64,10 +65,14 @@
         GUIManager(Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen);
         ~GUIManager();
 
-        void update(const Clock& time);
+        void update(const Clock& time); 
 
-        void showGUI(const std::string& name);
-        void executeCode(const std::string& str);
+        static void showGUI(const std::string& name, bool hidePrevious=false, bool showCursor=true);
+        void showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious=false, bool showCursor=true);
+        static void hideGUI(const std::string& name);
+        void toggleIngameGUI();
+        void keyESC();
+        void setBackground(const std::string& name);
 
         void setCamera(Ogre::Camera* camera);
         Ogre::Camera* getCamera() { return this->camera_; }
@@ -82,6 +87,10 @@
     private:
         GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
 
+        std::set<std::string> showingGUIs_; //!< Keeps track of all the GUIs that are currently showing.
+
+        void executeCode(const std::string& str);
+
         // keyHandler functions
         void keyPressed (const KeyEvent& evt);
         void keyReleased(const KeyEvent& evt);
@@ -104,6 +113,7 @@
         Ogre::Camera*                        camera_;           //!< Camera used to render the scene with the GUI
 
         static GUIManager*                   singletonPtr_s;    //!< Singleton reference to GUIManager
+        bool                                 bShowIngameGUI_;
 
     };
 }

Modified: code/branches/presentation2/src/libraries/core/Game.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Game.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/Game.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -50,12 +50,16 @@
 #include "ConfigValueIncludes.h"
 #include "GameMode.h"
 #include "GameState.h"
+#include "GUIManager.h"
 
 namespace orxonox
 {
     static void stop_game()
         { Game::getInstance().stop(); }
     SetConsoleCommandShortcutExternAlias(stop_game, "exit");
+    static void key_esc()
+        { Game::getInstance().keyESC(); }
+    SetConsoleCommandShortcutExternAlias(key_esc, "keyESC");
     static void printFPS()
         { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; }
     SetConsoleCommandShortcutExternAlias(printFPS, "printFPS");
@@ -326,6 +330,14 @@
             excessSleepTime_ = 50000;
     }
 
+    void Game::keyESC()
+    {
+        if( this->getState("mainMenu") && this->getState("mainMenu")->getActivity().active==true )
+            this->stop();
+        else
+            GUIManager::getInstance().keyESC();
+    }
+
     void Game::stop()
     {
         this->bAbort_ = true;
@@ -556,7 +568,7 @@
             graphicsUnloader.Dismiss();
 
         shared_ptr<GameState> state = this->getState(name);
-        state->activate();
+        state->activateInternal();
         if (!this->loadedStates_.empty())
             this->loadedStates_.back()->activity_.topState = false;
         this->loadedStates_.push_back(state);
@@ -575,7 +587,7 @@
             this->loadedStates_.pop_back();
             if (!this->loadedStates_.empty())
                 this->loadedStates_.back()->activity_.topState = true;
-            state->deactivate();
+            state->deactivateInternal();
         }
         catch (...)
         {

Modified: code/branches/presentation2/src/libraries/core/Game.h
===================================================================
--- code/branches/presentation2/src/libraries/core/Game.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/Game.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -58,9 +58,11 @@
 */
 #define DeclareGameState(className, stateName, bIgnoreTickTime, bGraphicsMode) \
     static bool BOOST_PP_CAT(bGameStateDummy_##className, __LINE__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode)
-
+// tolua_begin
 namespace orxonox
 {
+// tolua_end
+
     //! Helper object required before GameStates are being constructed
     struct GameStateInfo
     {
@@ -76,8 +78,11 @@
     @remark
         You should only create this singleton once because it owns the Core class! (see remark there)
     */
-    class _CoreExport Game : public Singleton<Game>, public OrxonoxClass
-    {
+// tolua_begin
+    class _CoreExport Game
+// tolua_end
+        : public Singleton<Game>, public OrxonoxClass
+    { // tolua_export
         friend class Singleton<Game>;
         typedef std::vector<shared_ptr<GameState> > GameStateVector;
         typedef std::map<std::string, shared_ptr<GameState> > GameStateMap;
@@ -94,11 +99,14 @@
 
         void run();
         void stop();
+        void keyESC();
 
-        void requestState(const std::string& name);
-        void requestStates(const std::string& names);
-        void popState();
+        static Game& getInstance(){ return Singleton<Game>::getInstance(); } // tolua_export
 
+        void requestState(const std::string& name); //tolua_export
+        void requestStates(const std::string& names); //tolua_export
+        void popState(); //tolua_export
+
         const Clock& getGameClock() { return *this->gameClock_; }
 
         float getAvgTickTime() { return this->avgTickTime_; }
@@ -187,7 +195,7 @@
 
         static std::map<std::string, GameStateInfo> gameStateDeclarations_s;
         static Game* singletonPtr_s;        //!< Pointer to the Singleton
-    };
+    }; //tolua_export
 
     template <class T>
     /*static*/ bool Game::declareGameState(const std::string& className, const std::string& stateName, bool bIgnoreTickTime, bool bGraphicsMode)
@@ -213,6 +221,6 @@
         // just a required dummy return value
         return true;
     }
-}
+} //tolua_export
 
 #endif /* _Game_H__ */

Modified: code/branches/presentation2/src/libraries/core/GameState.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/GameState.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/GameState.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -82,7 +82,7 @@
     {
         this->activity_.active = false;
         this->activity_.deactivating = true;
-        this->activate();
+        this->deactivate();
         this->activity_.deactivating = false;
         this->activity_.suspended = false;
         this->activity_.updating = false;

Modified: code/branches/presentation2/src/libraries/core/LuaState.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/LuaState.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/LuaState.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -115,7 +115,7 @@
                     << (resourceGroup == "NoResourceGroupProvided" ? sourceFileInfo_->group : resourceGroup) << "': group not found." << std::endl;
     }
 
-    void LuaState::includeString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo)
+    void LuaState::includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     {
         // Parse string with provided include parser (otherwise don't preparse at all)
         std::string luaInput;
@@ -137,7 +137,7 @@
                 << (resourceGroup == "NoResourceGroupProvided" ? sourceFileInfo_->group : resourceGroup) << "': group not found." << std::endl;
     }
 
-    void LuaState::doString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo)
+    void LuaState::doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     {
         // Save the oold source file info
         shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
@@ -163,7 +163,7 @@
             std::string origin;
             if (sourceFileInfo != NULL)
                 origin = " originating from " + sourceFileInfo_->filename;
-            COUT(2) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl;
+            COUT(1) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl;
             // return value is nil
             lua_pushnil(luaState_);
         }

Modified: code/branches/presentation2/src/libraries/core/LuaState.h
===================================================================
--- code/branches/presentation2/src/libraries/core/LuaState.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/LuaState.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -56,10 +56,10 @@
         ~LuaState();
 
         void doFile(const std::string& filename, const std::string& resourceGroup = "General", bool bSearchOtherPaths = true); // tolua_export
-        void doString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo = shared_ptr<ResourceInfo>());
+        void doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
 
         void includeFile(const std::string& filename, const std::string& resourceGroup = "General", bool bSearchOtherPaths = true); // tolua_export
-        void includeString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo = shared_ptr<ResourceInfo>());
+        void includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
 
         void luaPrint(const std::string& str); // tolua_export
         void luaLog(unsigned int level, const std::string& message); // tolua_export
@@ -71,6 +71,9 @@
         void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; }
         lua_State* getInternalLuaState() { return luaState_; }
 
+        void setDefaultResourceInfo(const shared_ptr<ResourceInfo>& sourceFileInfo) { this->sourceFileInfo_ = sourceFileInfo; }
+        const shared_ptr<ResourceInfo>& getDefaultResourceInfo() { return this->sourceFileInfo_; }
+
         static bool addToluaInterface(int (*function)(lua_State*), const std::string& name);
         static bool removeToluaInterface(const std::string& name);
         static void openToluaInterfaces(lua_State* state);

Modified: code/branches/presentation2/src/libraries/core/input/InputManager.h
===================================================================
--- code/branches/presentation2/src/libraries/core/input/InputManager.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/libraries/core/input/InputManager.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -40,6 +40,7 @@
 #include "core/WindowEventListener.h"
 #include "InputState.h"
 
+// tolua_begin
 namespace orxonox
 {
     /**
@@ -62,8 +63,10 @@
         - Keyboard construction is mandatory , mouse and joy sticks are not.
           If the OIS::InputManager or the Keyboard fail, an exception is thrown.
     */
-    class _CoreExport InputManager : public Singleton<InputManager>, public WindowEventListener
-    {
+    class _CoreExport InputManager
+// tolua_end
+        : public Singleton<InputManager>, public WindowEventListener
+    { // tolua_export
         friend class Singleton<InputManager>;
     public:
         //! Represents internal states of the InputManager.
@@ -138,14 +141,14 @@
         @return
             False if name was not found, true otherwise.
         */
-        bool enterState(const std::string& name);
+        bool enterState(const std::string& name); // tolua_export
         /**
         @brief
             Deactivates a specific input state.
         @return
             False if name was not found, true otherwise.
         */
-        bool leaveState(const std::string& name);
+        bool leaveState(const std::string& name); // tolua_export
         /**
         @brief
             Removes and destroys an input state.
@@ -166,6 +169,8 @@
         //! Returns a pointer to the OIS InputManager. Only you if you know what you're doing!
         OIS::InputManager* getOISInputManager() { return this->oisInputManager_; }
         std::pair<int, int> getMousePosition() const;
+        
+        static InputManager& getInstance() { return *singletonPtr_s; } // tolua_export
 
     private: // functions
         // don't mess with a Singleton
@@ -206,7 +211,7 @@
         std::set<InputState*>               stateDestroyRequests_; //!< Requests to destroy a state
 
         static InputManager*                singletonPtr_s;        //!< Pointer reference to the singleton
-    };
-}
+    }; // tolua_export
+} // tolua_export
 
 #endif /* _InputManager_H__ */

Modified: code/branches/presentation2/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/branches/presentation2/src/modules/overlays/GUIOverlay.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/modules/overlays/GUIOverlay.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -72,17 +72,14 @@
             std::stringstream out;
             out << reinterpret_cast<long>(this);
             str = out.str();
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
-            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+            COUT(1) << "GUIManager ptr: " << str << std::endl;
+            GUIManager::getInstance().showGUIExtra(this->guiName_, str);
 
             COUT(3) << "Showing GUI " << this->guiName_ << std::endl;
         }
         else
         {
-            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
+            GUIManager::hideGUI(this->guiName_);
             COUT(3) << "Hiding GUI " << this->guiName_ << std::endl;
         }
     }

Modified: code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/modules/weapons/weaponmodes/HsW01.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -39,6 +39,7 @@
 #include "weaponsystem/WeaponPack.h"
 #include "weaponsystem/WeaponSystem.h"
 #include "worldentities/WorldEntity.h"
+#include "worldentities/pawns/Pawn.h"
 
 namespace orxonox
 {
@@ -103,6 +104,7 @@
 
     void HsW01::shot()
     {
+        assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );
         Projectile* projectile = new Projectile(this);
         Model* model = new Model(projectile);
         model->setMeshSource("laserbeam.mesh");
@@ -110,7 +112,7 @@
         projectile->attach(model);
         model->setScale(5);
 
-        this->computeMuzzleParameters();
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());
         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);

Modified: code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -63,8 +63,7 @@
     */
     void GSGraphics::activate()
     {
-        // add console command to toggle GUI
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI"));
+        
     }
 
     /**
@@ -77,18 +76,6 @@
         Map::hackDestroyMap();
     }
 
-    /**
-    @brief
-        Toggles the visibility of the current GUI
-
-        This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.
-        For more details on this function check out the Lua code.
-    */
-    void GSGraphics::toggleGUI()
-    {
-        GUIManager::getInstance().executeCode("toggleGUI()");
-    }
-
     void GSGraphics::update(const Clock& time)
     {
         if (this->getActivity().topState)

Modified: code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -56,8 +56,6 @@
         void deactivate();
         void update(const Clock& time);
 
-        void toggleGUI();
-
     private:
     };
 }

Modified: code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -55,6 +55,7 @@
         , guiMouseOnlyInputState_(0)
         , guiKeysOnlyInputState_(0)
         , startFile_(0)
+        , bShowIngameGUI_(false)
     {
     }
 
@@ -77,8 +78,6 @@
 
             guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
             guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
-
-            CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSLevel::showIngameGUI, this), "showIngameGUI"));
         }
 
         if (GameMode::isMaster())
@@ -96,22 +95,6 @@
         }
     }
 
-    void GSLevel::showIngameGUI(bool show)
-    {
-        if (show)
-        {
-            GUIManager::getInstance().showGUI("inGameTest");
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
-        }
-        else
-        {
-            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
-        }
-    }
-
     void GSLevel::deactivate()
     {
         if (GameMode::showsGraphics())

Modified: code/branches/presentation2/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSLevel.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSLevel.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -51,7 +51,6 @@
     protected:
         void loadLevel();
         void unloadLevel();
-        void showIngameGUI(bool show);
 
         InputState*              gameInputState_;          //!< input state for normal ingame playing
         InputState*              guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
@@ -59,6 +58,7 @@
 
         XMLFile* startFile_;
         std::set<BaseObject*> staticObjects_;
+        bool bShowIngameGUI_;
     };
 }
 

Modified: code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -82,8 +82,10 @@
     void GSMainMenu::activate()
     {
         // show main menu
-        GUIManager::getInstance().showGUI("MainMenu");
+        GUIManager::getInstance().showGUI("MainMenu", true, false);
         GUIManager::getInstance().setCamera(this->camera_);
+        GUIManager::getInstance().setBackground("MainMenuBackground");
+//         GUIManager::getInstance().setBackground("");
         GraphicsManager::getInstance().setCamera(this->camera_);
 
         CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame"));
@@ -117,6 +119,8 @@
         InputManager::getInstance().leaveState("mainMenu");
 
         GUIManager::getInstance().setCamera(0);
+        GUIManager::getInstance().setBackground("");
+        GUIManager::hideGUI("MainMenu");
         GraphicsManager::getInstance().setCamera(0);
     }
 

Modified: code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -85,15 +85,11 @@
     void PickupInventory::toggleInventory()
     {
         if(PickupInventory::getSingleton()->isVisible()) {
-            GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
+            GUIManager::hideGUI("PickupInventory");
         }
         else
         {
-            GUIManager::getInstance().showGUI("PickupInventory");
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
+            GUIManager::showGUI("PickupInventory");
         }
         PickupInventory::getSingleton()->setVisible(!PickupInventory::getSingleton()->isVisible());
     }

Modified: code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -95,8 +95,8 @@
 
         //  & load the GUI itself too, along with some empty windows
         //   = even less delays
-        GUIManager::getInstance().showGUI("PickupInventory");
-        GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
+        GUIManager::showGUI("PickupInventory");
+        GUIManager::hideGUI("PickupInventory");
         PickupInventory::getSingleton();
     }
     /**

Modified: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	2009-11-25 15:52:37 UTC (rev 6150)
@@ -195,7 +195,7 @@
         this->bReloading_ = false;
     }
 
-    void WeaponMode::computeMuzzleParameters()
+    void WeaponMode::computeMuzzleParameters(const Vector3& target)
     {
         if (this->weapon_)
         {
@@ -203,12 +203,7 @@
 
             Pawn* pawn = this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn();
             Vector3 muzzleDirection;
-            if ( pawn->getTarget() )
-            {
-                muzzleDirection = pawn->getTarget()->getWorldPosition() - this->muzzlePosition_;
-            }
-            else
-                muzzleDirection = pawn->getAimPosition() - this->muzzlePosition_;
+            muzzleDirection = target - this->muzzlePosition_;
 //             COUT(0) << "muzzleDirection " << muzzleDirection << endl;
             this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation();
         }

Modified: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h	2009-11-25 15:20:05 UTC (rev 6149)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h	2009-11-25 15:52:37 UTC (rev 6150)
@@ -108,7 +108,7 @@
             inline const Vector3& getMuzzleOffset() const
                 { return this->muzzleOffset_; }
 
-            void computeMuzzleParameters();
+            void computeMuzzleParameters(const Vector3& target);
             const Vector3& getMuzzlePosition() const
                 { return this->muzzlePosition_; }
             const Quaternion& getMuzzleOrientation() const




More information about the Orxonox-commit mailing list