[Orxonox-commit 7178] r11795 - in code/branches/cegui0.8_ogre1.9: . cmake/tools data/gui/configs data/gui/layouts data/gui/schemes data/gui/scripts data/levels src/libraries/core src/libraries/util src/modules/designtools src/modules/hover src/modules/objects src/modules/overlays src/modules/overlays/hud src/modules/overlays/stats src/orxonox src/orxonox/chat src/orxonox/controllers src/orxonox/graphics src/orxonox/overlays src/orxonox/worldentities

landauf at orxonox.net landauf at orxonox.net
Wed Feb 21 00:03:52 CET 2018


Author: landauf
Date: 2018-02-21 00:03:52 +0100 (Wed, 21 Feb 2018)
New Revision: 11795

Modified:
   code/branches/cegui0.8_ogre1.9/
   code/branches/cegui0.8_ogre1.9/cmake/tools/FindCEGUI.cmake
   code/branches/cegui0.8_ogre1.9/cmake/tools/FindOGRE.cmake
   code/branches/cegui0.8_ogre1.9/data/gui/configs/CEGUIConfig.xsd
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox-inputonly.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/GUILayout.xsd
   code/branches/cegui0.8_ogre1.9/data/gui/schemes/GUIScheme.xsd
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUISheet.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/GameplayMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/InitialiseGUI.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/MainMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/SheetManager.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua
   code/branches/cegui0.8_ogre1.9/data/levels/asteroidField.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/dockingToASpaceStation.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/dynamicMatch.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/earth.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/levelTry.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/planets.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentation09.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationHS09.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/shadertest.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/testSwallow.oxw
   code/branches/cegui0.8_ogre1.9/src/libraries/core/CMakeLists.txt
   code/branches/cegui0.8_ogre1.9/src/libraries/core/GUIManager.cc
   code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.cc
   code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.h
   code/branches/cegui0.8_ogre1.9/src/libraries/util/DisplayStringConversions.h
   code/branches/cegui0.8_ogre1.9/src/libraries/util/OgreForwardRefs.h
   code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc
   code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc
   code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc
   code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h
   code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/CMakeLists.txt
   code/branches/cegui0.8_ogre1.9/src/orxonox/RenderQueueListener.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/Scene.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/chat/ChatInputHandler.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/controllers/NewHumanController.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/AnimatedModel.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Camera.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.h
   code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/InGameConsole.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc
   code/branches/cegui0.8_ogre1.9/src/orxonox/worldentities/WorldEntity.cc
Log:
merged ogre1.9 (including cegui0.8) into new branch

Index: code/branches/cegui0.8_ogre1.9
===================================================================
--- code/branches/cegui0.8_ogre1.9	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9	2018-02-20 23:03:52 UTC (rev 11795)

Property changes on: code/branches/cegui0.8_ogre1.9
___________________________________________________________________
Modified: svn:mergeinfo
## -27,6 +27,7 ##
 /code/branches/buildsystem2:2506-2658
 /code/branches/buildsystem3:2662-2708
 /code/branches/campaignHS15:10639-10973
+/code/branches/cegui0.8:11110-11210
 /code/branches/ceguilua:1802-1808
 /code/branches/chat:6527-6797
 /code/branches/chat2:6836-6910
## -109,6 +110,7 ##
 /code/branches/notifications:7314-7401
 /code/branches/objecthierarchy:1911-2085,2100,2110-2169
 /code/branches/objecthierarchy2:2171-2479
+/code/branches/ogre1.9:11125-11793
 /code/branches/ois_update:7506-7788
 /code/branches/output:8739-8857
 /code/branches/overlay:2117-2385
Modified: code/branches/cegui0.8_ogre1.9/cmake/tools/FindCEGUI.cmake
===================================================================
--- code/branches/cegui0.8_ogre1.9/cmake/tools/FindCEGUI.cmake	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/cmake/tools/FindCEGUI.cmake	2018-02-20 23:03:52 UTC (rev 11795)
@@ -38,7 +38,7 @@
 DETERMINE_VERSION(CEGUI ${CEGUI_VERSION_FILE})
 
 # Find CEGUI headers
-COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare TRUE)
+COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare)
 # Version 0.8 introduced a new directory and file naming convention
 IF(_version_0_8_compare GREATER -1)
   # 0.8 and newer

Modified: code/branches/cegui0.8_ogre1.9/cmake/tools/FindOGRE.cmake
===================================================================
--- code/branches/cegui0.8_ogre1.9/cmake/tools/FindOGRE.cmake	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/cmake/tools/FindOGRE.cmake	2018-02-20 23:03:52 UTC (rev 11795)
@@ -37,6 +37,23 @@
 
 # Inspect OgrePrerquisites.h for the version number
 DETERMINE_VERSION(OGRE ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h)
+COMPARE_VERSION_STRINGS("${OGRE_VERSION}" "1.9" _version_1_9_compare TRUE)
+# Version 1.9 moved overlays into a separate component (which means we must find and link to another library)
+IF(_version_1_9_compare GREATER -1)
+  FIND_LIBRARY(OGRE_OVERLAY_LIBRARY_OPTIMIZED
+    NAMES OgreOverlay
+    PATHS $ENV{OGRE_HOME}
+    PATH_SUFFIXES lib bin/Release bin/release Release release
+  )
+  FIND_LIBRARY(OGRE_OVERLAY_LIBRARY_DEBUG
+    NAMES OgreOverlayd OgreOverlay_d OgreOverlayD OgreOverlay_D
+    PATHS $ENV{OGRE_HOME}
+    PATH_SUFFIXES lib bin/Debug bin/debug Debug debug
+  )
+  SET(OGRE_REQUIRED_VARIABLES
+    OGRE_OVERLAY_LIBRARY_OPTIMIZED
+  )
+ENDIF()
 
 # Handle the REQUIRED argument and set OGRE_FOUND
 # Also check the version requirements
@@ -43,13 +60,17 @@
 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION}
   OGRE_LIBRARY_OPTIMIZED
   OGRE_INCLUDE_DIR
+  ${OGRE_REQUIRED_VARIABLES}
 )
 
 # Collect optimized and debug libraries
 HANDLE_LIBRARY_TYPES(OGRE)
+HANDLE_LIBRARY_TYPES(OGRE_OVERLAY)
 
 MARK_AS_ADVANCED(
   OGRE_INCLUDE_DIR
   OGRE_LIBRARY_OPTIMIZED
   OGRE_LIBRARY_DEBUG
+  OGRE_OVERLAY_LIBRARY_OPTIMIZED
+  OGRE_OVERLAY_LIBRARY_DEBUG
 )

Modified: code/branches/cegui0.8_ogre1.9/data/gui/configs/CEGUIConfig.xsd
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/configs/CEGUIConfig.xsd	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/configs/CEGUIConfig.xsd	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,9 +1,89 @@
 <?xml version="1.0"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-
     <xsd:element name="CEGUIConfig" type="CEGUIConfigType"/>
 
-    <xsd:simpleType name="LogLevel">
+    <xsd:complexType name="CEGUIConfigType">
+        <xsd:sequence>
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+                <xsd:element name="Logging" type="loggingType" />
+                <xsd:element name="AutoLoad" type="autoLoadType" />
+                <xsd:element name="ResourceDirectory" type="resourceDirectoryType" />
+                <xsd:element name="DefaultResourceGroup" type="defaultResourceGroupType" />
+                <xsd:element name="Scripting" type="scriptingType" />
+                <xsd:element name="DefaultXMLParser" type="defaultObjectType" />
+                <xsd:element name="DefaultImageCodec" type="defaultObjectType" />
+                <xsd:element name="DefaultFont" type="defaultObjectType" />
+                <xsd:element name="DefaultMouseCursor" type="defaultMouseCursorType" />
+                <xsd:element name="DefaultTooltip" type="defaultObjectType" />
+                <xsd:element name="DefaultGUISheet" type="defaultObjectType" />
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="loggingType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="filename" type="xsd:string" use="optional" default="CEGUI.log" />
+                <xsd:attribute name="level" type="logLevel" use="optional" default="Standard" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="autoLoadType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="type" type="resourceType" use="required" />
+                <xsd:attribute name="group" type="xsd:string" use="optional" default="" />
+                <xsd:attribute name="pattern" type="xsd:string" use="optional" default="*" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="resourceDirectoryType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="group" type="xsd:string" use="required" />
+                <xsd:attribute name="directory" type="xsd:string" use="required" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="defaultResourceGroupType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="type" type="resourceType" use="optional" default="Default" />
+                <xsd:attribute name="group" type="xsd:string" use="required" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="scriptingType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="initScript" type="xsd:string" use="optional" default="" />
+                <xsd:attribute name="terminateScript" type="xsd:string" use="optional" default="" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="defaultObjectType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="defaultMouseCursorType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute name="imageset" type="xsd:string" use="required" />
+                <xsd:attribute name="image" type="xsd:string" use="required" />
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+    <xsd:simpleType name="logLevel">
         <xsd:restriction base="xsd:string">
             <xsd:enumeration value="Errors"/>
             <xsd:enumeration value="Standard"/>
@@ -12,17 +92,17 @@
         </xsd:restriction>
     </xsd:simpleType>
 
-    <xsd:complexType name="CEGUIConfigType">
-        <xsd:attribute name="Logfile" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="Scheme" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="DefaultFont" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="Layout" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="InitScript" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="TerminateScript" type="xsd:string" use="optional" default=""/>
-        <xsd:attribute name="DefaultResourceGroup" type="xsd:string" use="optional"  default="" />
-        <xsd:attribute name="LoggingLevel" type="LogLevel" use="optional"  default="Standard" />
-    </xsd:complexType>
+    <xsd:simpleType name="resourceType">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="Imageset"/>
+            <xsd:enumeration value="Font"/>
+            <xsd:enumeration value="Scheme"/>
+            <xsd:enumeration value="LookNFeel"/>
+            <xsd:enumeration value="Layout"/>
+            <xsd:enumeration value="Script"/>
+            <xsd:enumeration value="XMLSchema"/>
+            <xsd:enumeration value="Default"/>
+        </xsd:restriction>
+    </xsd:simpleType>
 
 </xsd:schema>
-
-

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox-inputonly.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox-inputonly.layout	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox-inputonly.layout	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Root" type="DefaultWindow">
+    <Window name="ChatBox-inputonly" type="DefaultWindow">
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox.layout	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/ChatBox.layout	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,10 +1,10 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Root" type="DefaultWindow">
+    <Window name="ChatBox" type="DefaultWindow">
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
-        <Window name="ChatBox" type="MenuWidgets/FrameWindow">
+        <Window name="frame" type="MenuWidgets/FrameWindow">
             <Property name="Text" value="Chat" />
             <Property name="InheritsAlpha" value="False" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/GUILayout.xsd
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/GUILayout.xsd	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/GUILayout.xsd	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,63 +1,72 @@
 <?xml version="1.0"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
 
-    <xsd:element name="GUILayout" type="GUILayoutType"/>
+	<xsd:element name="GUILayout" type="GUILayoutType"/>
+	
+	<xsd:complexType name="GUILayoutType">
+		<xsd:sequence>
+			<xsd:element name="Window" type="WindowType" />
+		</xsd:sequence>
+		<xsd:attribute name="version" type="xsd:nonNegativeInteger" use="optional" default="0" />
+	</xsd:complexType>
+	
+	<xsd:complexType name="WindowType">
+		<xsd:sequence>
+			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element name="Window" type="WindowType" />
+				<xsd:element name="AutoWindow" type="AutoWindowType" />
+			</xsd:choice>
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="UserString" type="UserStringType"  minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="type" type="xsd:string" use="required"/>
+		<xsd:attribute name="name" type="xsd:string" use="optional" default="" />
+	</xsd:complexType>
 
-    <xsd:complexType name="GUILayoutType">
-        <xsd:sequence>
-            <xsd:element name="Window" type="WindowType" />
-        </xsd:sequence>
-        <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
-    </xsd:complexType>
+	<xsd:complexType name="AutoWindowType">
+		<xsd:sequence>
+			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element name="Window" type="WindowType" />
+				<xsd:element name="AutoWindow" type="AutoWindowType" />
+			</xsd:choice>
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="namePath" type="xsd:string" use="required"/>
+	</xsd:complexType>
 
-    <xsd:complexType name="WindowType">
-        <xsd:sequence>
-            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element name="Window" type="WindowType" />
-                <xsd:element name="AutoWindow" type="AutoWindowType" />
-            </xsd:choice>
-            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-        </xsd:sequence>
-        <xsd:attribute name="Type" type="xsd:string" use="required"/>
-        <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
-    </xsd:complexType>
+	<xsd:complexType name="PropertyType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attribute name="name" type="xsd:string" use="required"/>
+				<xsd:attribute name="value" type="xsd:string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent> 
+	</xsd:complexType>
+	
+	<xsd:complexType name="UserStringType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attribute name="name" type="xsd:string" use="required"/>
+				<xsd:attribute name="value" type="xsd:string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent> 
+	</xsd:complexType>
+	
+	<xsd:complexType name="LayoutImportType">
+		<xsd:attribute name="filename" type="xsd:string" use="required"/>
+		<xsd:attribute name="resourceGroup" type="xsd:string" use="optional"  default="" />
+	</xsd:complexType>
 
-    <xsd:complexType name="AutoWindowType">
-        <xsd:sequence>
-            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
-            <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element name="Window" type="WindowType" />
-                <xsd:element name="AutoWindow" type="AutoWindowType" />
-            </xsd:choice>
-            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
-        </xsd:sequence>
-        <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
-    </xsd:complexType>
+	<xsd:complexType name="EventType">
+		<xsd:attribute name="name" type="xsd:string" use="required"/>
+		<xsd:attribute name="function" type="xsd:string" use="required"/>
+	</xsd:complexType>
 
-    <xsd:complexType name="PropertyType">
-        <xsd:simpleContent>
-            <xsd:extension base="xsd:string">
-                <xsd:attribute name="Name" type="xsd:string" use="required"/>
-                <xsd:attribute name="Value" type="xsd:string" use="optional"/>
-            </xsd:extension>
-        </xsd:simpleContent>
-    </xsd:complexType>
-
-    <xsd:complexType name="LayoutImportType">
-        <xsd:attribute name="Filename" type="xsd:string" use="required"/>
-        <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
-        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
-    </xsd:complexType>
-
-    <xsd:complexType name="EventType">
-        <xsd:attribute name="Name" type="xsd:string" use="required"/>
-        <xsd:attribute name="Function" type="xsd:string" use="required"/>
-    </xsd:complexType>
-
 </xsd:schema>
 

Modified: code/branches/cegui0.8_ogre1.9/data/gui/schemes/GUIScheme.xsd
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/schemes/GUIScheme.xsd	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/schemes/GUIScheme.xsd	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,54 +1,56 @@
 <?xml version="1.0" ?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-    <xsd:element name="GUIScheme" type="SchemeType" />
-    <xsd:complexType name="SchemeType">
+	<xsd:element name="GUIScheme" type="SchemeType" />
+	<xsd:complexType name="SchemeType">
         <xsd:choice minOccurs="0" maxOccurs="unbounded">
-            <xsd:element name="Imageset" type="NamedDataType" />
+			<xsd:element name="Imageset" type="NamedDataType" />
             <xsd:element name="ImagesetFromImage" type="NamedDataType" />
-            <xsd:element name="Font" type="NamedDataType" />
+			<xsd:element name="Font" type="NamedDataType" />
             <xsd:element name="LookNFeel" type="FileDataType" />
-            <xsd:element name="WindowSet" type="WindowSetType" />
-            <xsd:element name="WindowRendererSet" type="WindowRendererSetType" />
-            <xsd:element name="WindowAlias" type="WindowAliasType" />
+			<xsd:element name="WindowSet" type="WindowSetType" />
+			<xsd:element name="WindowRendererSet" type="WindowRendererSetType" />
+			<xsd:element name="WindowAlias" type="WindowAliasType" />
             <xsd:element name="FalagardMapping" type="FalagardMapType" />
-        </xsd:choice>
-        <xsd:attribute name="Name" type="xsd:string" use="required" />
-    </xsd:complexType>
-    <xsd:complexType name="WindowSetType">
-        <xsd:sequence>
+		</xsd:choice>
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+		<xsd:attribute name="version" type="xsd:nonNegativeInteger" use="optional" default="0" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowSetType">
+		<xsd:sequence>
             <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" />
-        </xsd:sequence>
-        <xsd:attribute name="Filename" type="xsd:string" use="required" />
-    </xsd:complexType>
-    <xsd:complexType name="WindowRendererSetType">
-        <xsd:sequence>
+		</xsd:sequence>
+		<xsd:attribute name="filename" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowRendererSetType">
+		<xsd:sequence>
             <xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" />
-        </xsd:sequence>
-        <xsd:attribute name="Filename" type="xsd:string" use="required" />
-    </xsd:complexType>
+		</xsd:sequence>
+		<xsd:attribute name="filename" type="xsd:string" use="required" />
+	</xsd:complexType>
     <xsd:complexType name="FileDataType">
-        <xsd:attribute name="Filename" type="xsd:string" use="required" />
-        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+        <xsd:attribute name="filename" type="xsd:string" use="required" />
+        <xsd:attribute name="resourceGroup" type="xsd:string" use="optional"  default="" />
     </xsd:complexType>
-    <xsd:complexType name="NamedDataType">
-        <xsd:attribute name="Name" type="xsd:string" use="required" />
-        <xsd:attribute name="Filename" type="xsd:string" use="required" />
-        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
-    </xsd:complexType>
-    <xsd:complexType name="WindowFactoryType">
-        <xsd:attribute name="Name" type="xsd:string" use="required" />
-    </xsd:complexType>
-    <xsd:complexType name="WindowRendererFactoryType">
-        <xsd:attribute name="Name" type="xsd:string" use="required" />
-    </xsd:complexType>
-    <xsd:complexType name="WindowAliasType">
-        <xsd:attribute name="Alias" type="xsd:string" use="required" />
-        <xsd:attribute name="Target" type="xsd:string" use="required" />
-    </xsd:complexType>
+	<xsd:complexType name="NamedDataType">
+		<xsd:attribute name="name" type="xsd:string" use="optional" default="" />
+		<xsd:attribute name="filename" type="xsd:string" use="required" />
+		<xsd:attribute name="resourceGroup" type="xsd:string" use="optional"  default="" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowFactoryType">
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowRendererFactoryType">
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowAliasType">
+		<xsd:attribute name="alias" type="xsd:string" use="required" />
+		<xsd:attribute name="target" type="xsd:string" use="required" />
+	</xsd:complexType>
     <xsd:complexType name="FalagardMapType">
-        <xsd:attribute name="WindowType" type="xsd:string" use="required" />
-        <xsd:attribute name="TargetType" type="xsd:string" use="required" />
-        <xsd:attribute name="Renderer" type="xsd:string" use="required" />
-        <xsd:attribute name="LookNFeel" type="xsd:string" use="required" />
+        <xsd:attribute name="windowType" type="xsd:string" use="required" />
+        <xsd:attribute name="targetType" type="xsd:string" use="required" />
+		<xsd:attribute name="renderer" type="xsd:string" use="required" />
+        <xsd:attribute name="lookNFeel" type="xsd:string" use="required" />
+        <xsd:attribute name="renderEffect" type="xsd:string" use="optional" default="" />
     </xsd:complexType>
 </xsd:schema>

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -36,7 +36,7 @@
     table.insert(themeList, "Metal")
     for k,v in pairs(themeList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         CEGUI.toListbox(listboxwindow):addItem(item)
     end
     if orxonox.getConfig("MoodManager", "mood_") == "dnb" then

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -41,7 +41,7 @@
 
     for k in pairs(P.docks) do
         local item = CEGUI.createListboxTextItem("Dock " .. k)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         listbox:addItem(item)
         if k == 1 then
             listbox:setItemSelectState(item, true)

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUISheet.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUISheet.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUISheet.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -65,7 +65,7 @@
 
 function P:load()
     -- Load the layout that describes the sheet
-    self.window = winMgr:loadWindowLayout(self.name .. ".layout")
+    self.window = winMgr:loadLayoutFromFile(self.name .. ".layout")
     if self.window == nil then
         error("Could not load layout file for GUI sheet '"..self.name.."'")
     end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/GameplayMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/GameplayMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/GameplayMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -10,7 +10,7 @@
     table.insert(themeList, "Theme 3")
     for k,v in pairs(themeList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         CEGUI.toCombobox(dropdown):addItem(item)
     end
 end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -38,7 +38,7 @@
 
     for k,v in pairs(P.resolutionList) do
         local item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         resolutionCombobox:addItem(item)
     end
 
@@ -48,7 +48,7 @@
 
     for k,v in pairs(P.schemeList) do
         local item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         themeCombobox:addItem(item)
     end
 
@@ -58,7 +58,7 @@
 
     for k,v in pairs(P.fsaaList) do
         local item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         fsaaCombobox:addItem(item)
     end
 
@@ -68,7 +68,7 @@
 
     for k,v in pairs(P.particleLodList) do
         local item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         particleLodCombobox:addItem(item)
     end
 end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -72,7 +72,7 @@
     --table.sort(levelList)
     for k,v in pairs(P.levelList) do
         local item = CEGUI.createListboxTextItem(v:getName())
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         listbox:addItem(item)
         if v:getXMLFilename() == preselect then
             listbox:setItemSelectState(item, true)

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/InitialiseGUI.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/InitialiseGUI.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -7,7 +7,7 @@
 local scheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_")
 -- Load all required skins
 --schemeMgr:create("TaharezGreenLook.scheme")
-schemeMgr:create(scheme .. "Look.scheme")
+schemeMgr:createFromFile(scheme .. "Look.scheme")
 --schemeMgr:create("TaharezLook.scheme")
 --schemeMgr:create("WindowsLook.scheme")
 --schemeMgr:create("VanillaLook.scheme")
@@ -20,18 +20,18 @@
 --menuImageSet = "TaharezGreenLook"
 --schemeMgr:create("TaharezGreenHUDWidgets.scheme")
 --hudImageSet = "TaharezGreenLook"
-schemeMgr:create(scheme .. "MenuWidgets.scheme")
+schemeMgr:createFromFile(scheme .. "MenuWidgets.scheme")
 menuImageSet = scheme .. "Look"
-schemeMgr:create(scheme .. "HUDWidgets.scheme")
+schemeMgr:createFromFile(scheme .. "HUDWidgets.scheme")
 hudImageSet = scheme .. "Look"
 
 -- Just a remaining test hack
-schemeMgr:create("OrxonoxGUIScheme.scheme")
+schemeMgr:createFromFile("OrxonoxGUIScheme.scheme")
 
-local system = CEGUI.System:getSingleton()
-system:setDefaultMouseCursor(menuImageSet, "MouseArrow")
+local system = CEGUI.System:getSingleton():getDefaultGUIContext()
+system:getMouseCursor():setDefaultImage(menuImageSet .. "/MouseArrow")
 system:setDefaultFont("BlueHighway-12")
-system:setDefaultTooltip("MenuWidgets/Tooltip")
+system:setDefaultTooltipType("MenuWidgets/Tooltip")
 
 -- Convenience function and additional tools
 require("GUITools")

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/MainMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/MainMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/MainMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -6,37 +6,37 @@
 function P.onLoad()
     --buttons are arranged in a 6x1 Matrix (list)
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/QuickGameTestButton"),
+            ["button"] = P.window:getChild("QuickGameTestButton"),
             ["callback"]  = P.QuickGameTestButton_clicked
     })
 
     P:setButton(2, 1, {
-            ["button"] = winMgr:getWindow("orxonox/SingleplayerButton"),
+            ["button"] = P.window:getChild("SingleplayerButton"),
             ["callback"]  = P.SingleplayerButton_clicked
     })
 
     P:setButton(3, 1, {
-            ["button"] = winMgr:getWindow("orxonox/MultiplayerButton"),
+            ["button"] = P.window:getChild("MultiplayerButton"),
             ["callback"]  = P.MultiplayerButton_clicked
     })
 
     P:setButton(4, 1, {
-            ["button"] = winMgr:getWindow("orxonox/HighscoreButton"),
+            ["button"] = P.window:getChild("HighscoreButton"),
             ["callback"]  = P.MultiplayerButton_clicked
     })
 
     P:setButton(5, 1, {
-            ["button"] = winMgr:getWindow("orxonox/SettingsButton"),
+            ["button"] = P.window:getChild("SettingsButton"),
             ["callback"]  = P.SettingsButton_clicked
     })
 
     P:setButton(6, 1, {
-            ["button"] = winMgr:getWindow("orxonox/CreditsButton"),
+            ["button"] = P.window:getChild("CreditsButton"),
             ["callback"]  = P.CreditsButton_clicked
     })
 
     P:setButton(7, 1, {
-            ["button"] = winMgr:getWindow("orxonox/ExitButton"),
+            ["button"] = P.window:getChild("ExitButton"),
             ["callback"]  = P.ExitButton_clicked
     })
 end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -114,7 +114,7 @@
             local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
             item:setID(index)
             index = index + 1
-            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
             CEGUI.toListbox(listbox):addItem(item)
         end
     -- WAN Discovery
@@ -151,7 +151,7 @@
             local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
             item:setID(index)
             index = index + 1
-            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
             CEGUI.toListbox(listbox):addItem(item)
         end
     end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -114,7 +114,7 @@
     item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
 
     local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
-    image:setProperty("Image", "set:PickupInventory image:" .. representation:getInventoryRepresentation())
+    image:setProperty("Image", "PickupInventory/" .. representation:getInventoryRepresentation())
     image:setProperty("BackgroundEnabled", "set:False")
     image:setProperty("FrameEnabled", "set:True")
     image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight), CEGUI.UDim(0, P.imageHeight)))
@@ -214,7 +214,7 @@
     wrapper:addChildWindow(title)
     
     local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
-    image:setProperty("Image", "set:PickupInventory image:" .. representation:getInventoryRepresentation())
+    image:setProperty("Image", "PickupInventory/" .. representation:getInventoryRepresentation())
     image:setProperty("BackgroundEnabled", "set:False")
     image:setProperty("FrameEnabled", "set:True")
     image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize), CEGUI.UDim(0, P.detailImageSize)))

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -103,7 +103,7 @@
 function P.insertQuest(list, quest)
     if P.showActive == quest:isActive(P.player) then
         local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle())
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         list:addItem(item)
         table.insert(P.quests, quest)
         return item
@@ -140,7 +140,7 @@
         while i <= numQuests-1 do
             local quest = P.questManager:getSubQuest(quest, P.player, i)
             local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle())
-            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
             list:addItem(item)
             table.insert(P.subquests, quest)
             i = i+1

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/SheetManager.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/SheetManager.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/SheetManager.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1,6 +1,7 @@
 -- SheetManager.lua
 
-local cursor = CEGUI.MouseCursor:getSingleton()
+local cursor = CEGUI.System:getSingleton():getDefaultGUIContext():getMouseCursor()
+--local cursor = CEGUI.MouseCursor:getSingleton()
 local loadedSheets = {}
 local activeMenuSheets = {size = 0, topSheetTuple = nil}
 local menuSheetsRoot = guiMgr:getMenuRootWindow()
@@ -106,7 +107,7 @@
     activeMenuSheets.topSheetTuple = sheetTuple
 
     -- Add sheet to the root window
-    menuSheetsRoot:addChildWindow(menuSheet.window)
+    menuSheetsRoot:addChild(menuSheet.window)
 
     -- If sheet is the MainMenu
     if name == "MainMenu" then
@@ -176,7 +177,7 @@
     end
 
     -- Remove sheet with its tuple from the table
-    menuSheetsRoot:removeChildWindow(sheetTuple.sheet.window)
+    menuSheetsRoot:removeChild(sheetTuple.sheet.window)
     table.remove(activeMenuSheets, table.findIndex(activeMenuSheets, sheetTuple))
     activeMenuSheets[name] = nil
     activeMenuSheets.size = activeMenuSheets.size - 1

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -33,7 +33,7 @@
         --TODO: only add ship if is in the right filter tab
         --if tag == nil or v:hasStartingShip(tag) then
             local item = CEGUI.createListboxTextItem(v)
-            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
             listbox:addItem(item)
             table.insert(tabIndexes, k)
             --orxonox.GUIManager:setTooltipTextHelper(item, v:getDescription())
@@ -87,7 +87,7 @@
         --local levelXMLFilename = selectedlevel:getXMLFilename()
         --local imageName = selectedlevel:getScreenshot()
         -- set the screenshot and the description for the selected level
-        --levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
+        --levelImage:setProperty("Image", levelXMLFilename..imageName.."/full_image")
         --levelDescription:setText(level:getDescription())
         -- only enable config button for "gametype" levels
         --if level:hasTag("gametype") then

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerMenu.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerMenu.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -86,7 +86,7 @@
         -- only add level if it has desired tag
         if tag == nil or v:hasTag(tag) then
             local item = CEGUI.createListboxTextItem(v:getName())
-            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
             listbox:addItem(item)
             table.insert(tabIndexes, k)
             if v:getXMLFilename() == preselect then
@@ -129,7 +129,7 @@
         local levelXMLFilename = level:getXMLFilename()
         local imageName = level:getScreenshot()
         -- set the screenshot and the description for the selected level
-        levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
+        levelImage:setProperty("Image", levelXMLFilename..imageName.."/full_image")
         levelDescription:setText(level:getDescription())
         -- only enable config button for "gametype" levels
         if level:hasTag("gametype") then

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua	2018-02-20 23:03:52 UTC (rev 11795)
@@ -41,7 +41,7 @@
 
     for k in pairs(P.docks) do
         local item = CEGUI.createListboxTextItem("Dock " .. k)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         listbox:addItem(item)
         if k == 1 then
             listbox:setItemSelectState(item, true)

Modified: code/branches/cegui0.8_ogre1.9/data/levels/asteroidField.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/asteroidField.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/asteroidField.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -65,7 +65,7 @@
 
 
     <!-- Planet close to spawn point -->
-    <Planet
+    <MovableEntity
       position="15000,0,0"
       scale="5000"
       collisionType="dynamic"
@@ -73,22 +73,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
 
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/dockingToASpaceStation.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/dockingToASpaceStation.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/dockingToASpaceStation.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -152,7 +152,7 @@
         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
     ?>
 
-    <Planet
+    <MovableEntity
       position="15000,0,-1000"
       scale="5000"
       collisionType="dynamic"
@@ -160,22 +160,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/ganymede.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/ganymede.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
   </Scene>
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/dynamicMatch.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/dynamicMatch.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/dynamicMatch.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -32,8 +32,12 @@
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
 <!-- ------------------Planet needs gravity----------------- -->
-<Planet position="0,0,0" scale=500 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
-<StaticEntity position="0,0,0" collisionType=static>
+    <MovableEntity position="0,0,0" scale=500 pitch=-90 rotationaxis="8,1,0" rotationrate="1">
+      <attached>
+        <Planet mesh="iceplanet.mesh" atmosphere="atmosphere1" atmospheresize=224.0f imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
+    <StaticEntity position="0,0,0" collisionType=static>
       <collisionShapes>
         <SphereCollisionShape radius="499" />
       </collisionShapes>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/earth.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/earth.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/earth.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -55,56 +55,66 @@
     <PortalEndPoint position="70500,100,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
 
     <!-- This is a model of Earth: mass=EarthMass/1000 and radius=EarthRadius[km]*10 -->
-    <Planet
+    <MovableEntity
       position="0,0,0"
       scale="63000"
+      pitch="0"
       collisionType="dynamic"
       linearDamping="0.8"
       angularDamping="0"
       mass="5.9e21"
-      pitch="0"
-      mesh="planets/earth.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,1,0"
       rotationrate="0.2"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" />
+        <Planet
+          mesh="planets/earth.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="63000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <!-- This is a model of our Moon: mass=MoonMass/1000 and radius=MoonRadius[km]*10 and position=DistanceFromEarth[km]*10 -->
-    <Planet
+    <MovableEntity
       position="3625700,0,0"
       scale="17370"
+      pitch="0"
       collisionType="dynamic"
       linearDamping="0.8"
       angularDamping="0"
       mass="7.36e19"
-      pitch="0"
-      mesh="planets/moon.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,1,0"
       rotationrate="0.2"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" />
+        <Planet
+          mesh="planets/moon.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="17370" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
     <PortalEndPoint position="3603330,100,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
 
     <!-- Create portals from Earth to the Moon -->

Modified: code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -587,7 +587,7 @@
 
     <!-- Planets -->
 
-   <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet1) ?>"
         scale="3000"
         collisionType="dynamic"
@@ -595,24 +595,29 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/muunilinst.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage=2
         enablecollisiondamage=true
-	      visible=true
-	      active=ture
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="3000" position="0,0,0" />
+        <Planet
+            mesh="planets/muunilinst.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=true
+            active=ture
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")
@@ -619,7 +624,7 @@
         asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
     ?>
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet2) ?>"
         scale="2000"
         collisionType="dynamic"
@@ -627,24 +632,29 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/ganymede.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage=2
         enablecollisiondamage=true
-	      visible=true
-	      active=true
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="2000" position="0,0,0" />
+          <Planet
+            mesh="planets/ganymede.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=true
+            active=true
+          >
+            <attached>
+              <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+            </attached>
+          </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="2000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")
@@ -653,7 +663,7 @@
 
     <!-- EnemyPlanet(s) -->
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cEnemyBasePlanet) ?>"
         scale="5000"
         collisionType="dynamic"
@@ -661,24 +671,29 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/jupiter.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage=2
         enablecollisiondamage=true
-	      visible=false
-	      active=false
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="5000" position="0,0,0" />
+        <Planet
+            mesh="planets/jupiter.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=false
+            active=false
+          >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
       xi = 5

Modified: code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -2003,21 +2003,26 @@
         ?>
 
     <!-- PLANETS -->
-      <Planet
-            position="2000,-250,9000" 
-            scale=5000 
-            pitch=1 
+    <MovableEntity
+        position="2000,-250,9000" 
+        scale=5000 
+        pitch=1 
+        rotationaxis="1,1,0" 
+        rotationrate="0.5" 
+        mass="10000000"
+        angularDamping=0
+        collisiondamage=2
+        enablecollisiondamage=true
+        collisionType="dynamic"
+    >
+      <attached>
+        <Planet
             mesh="iceplanet.mesh" 
             atmosphere="atmosphere1" 
-            rotationaxis="1,1,0" 
-            rotationrate="0.5" 
             atmospheresize=224.0f 
-            imagesize=1024.0f
-            mass="10000000"
-            angularDamping=0
-            collisiondamage=2
-            enablecollisiondamage=true
-            collisionType="dynamic" />
+            imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
 
 <!--  PICKUPS to make travelling faster  -->
     <PickupSpawner pickup=hugespeedpickup position="11473,1275,7689" triggerDistance="400" respawnTime="10" maxSpawnedItems="5" />

Modified: code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -777,7 +777,11 @@
 <!--Asteroid Elipse end-->
 
 <!--Planet sun-->
-    <Planet position="15000,0,0" scale=1500 pitch=-90 mesh="planets/sol.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=0 imagesize=1024.0f />
+    <MovableEntity position="15000,0,0" scale=1500 pitch=-90 rotationaxis="8,1,0" rotationrate="1">
+      <attached>
+        <Planet mesh="planets/sol.mesh" atmosphere="atmosphere1" atmospheresize=0 imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
     <StaticEntity position="2600,0,0" collisionType=static>
         <collisionShapes>
             <SphereCollisionShape radius="399" />
@@ -789,7 +793,7 @@
 <!--Planet END-->
 
 <!--Planet with Ally-->
-    <Planet
+    <MovableEntity
       position="0,0,0"
       scale="100"
       collisionType="dynamic"
@@ -797,26 +801,31 @@
       angularDamping="0"
       mass="5000000"
       pitch="0"
-      mesh="iceplanet.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
     >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
-                    <ParticleEmitter position="0,0,0" source="Orxonox/fire3" />
+        <Planet
+          mesh="iceplanet.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
+                        <ParticleEmitter position="0,0,0" source="Orxonox/fire3" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="100" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 <!-- Planet with Ally END-->
 
 
 <!-- Homeplanet -->
-    <Planet
+    <MovableEntity
       position="-3000,12000,-10000"
       scale="3000"
       collisionType="dynamic"
@@ -824,30 +833,39 @@
       angularDamping="0"
       mass="5000000000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,0,0"
       rotationrate="0.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
     >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-900" />
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-900" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 <!-- Homeplanet  END-->
 
 <!-- Planet around the cave-->
 
-<Planet position="-43500,-30000,31900" scale=5000 pitch=-90 mesh="planets/moon.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=0 imagesize=1024.0f />
+    <MovableEntity position="-43500,-30000,31900" scale=5000 pitch=-90 rotationaxis="8,1,0" rotationrate="1">
+      <attached>
+        <Planet mesh="planets/moon.mesh" atmosphere="atmosphere1" atmospheresize=0 imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
 
 <!-- Planet around the cave END-->
 
 <!-- Anotherplanet -->
-    <Planet
+    <MovableEntity
       position="-20000,6000,7000"
       scale="3000"
       collisionType="dynamic"
@@ -855,17 +873,21 @@
       angularDamping="0"
       mass="5000000000000"
       pitch="0"
-      mesh="planets/ganymede.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,0,0"
       rotationrate="0.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
     >
+      <attached>
+        <Planet
+          mesh="planets/ganymede.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        />
+      </attached>
       <collisionShapes>
         <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 <!-- LAAAGS :-(
 
                 "The game lags, when you're flying far away"

Modified: code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -422,32 +422,37 @@
 	<!--ENDE Portal-->
 	   
 	<!--Heimatplanet-->
+    <MovableEntity
+      position="0,100000,0"
+      scale="10000"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="5000000"
+      pitch="180"
+      yaw="0"
+      roll="0"
+      rotationaxis="0,0,1"
+      rotationrate="5.0"
+      collisiondamage = 1
+      enablecollisiondamage = true
+    >
+      <attached>
 		<Planet
-		  position="0,100000,0"
-		  scale="10000"
-		  collisionType="dynamic"
-		  linearDamping="0.8"
-		  angularDamping="0"
-		  mass="5000000"
-		  pitch="180"
-		  yaw="0"
-		  roll="0"
 		  mesh="planets/earth.mesh"
 		  atmosphere="atmosphere1"
-		  rotationaxis="0,0,1"
-		  rotationrate="5.0"
 		  atmospheresize="80.0f"
 		  imagesize="1024.0f"
-		  collisiondamage = 1
-		  enablecollisiondamage = true
 		  >
 		  <attached>
-			  <ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
-			</attached>
-			<collisionShapes>
-			  <SphereCollisionShape radius="10000" position="0,0,0" />
-			</collisionShapes>
-		  </Planet>	 
+			<ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
+		  </attached>
+		</Planet>	 
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="10000" position="0,0,0" />
+      </collisionShapes>
+    </MovableEntity>
 	<!--ENDE Heimatplanet-->	
 
   </Scene>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/levelTry.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/levelTry.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/levelTry.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -148,7 +148,7 @@
         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
     ?>
 
-    <Planet
+    <MovableEntity
       position="15000,0,-1000"
       scale="5000"
       collisionType="dynamic"
@@ -156,22 +156,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/ganymede.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/ganymede.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
   </Scene>
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -1204,7 +1204,7 @@
 
 
 <!-- @Objects: planet && spaceboundaries  -->
-    <Planet
+    <MovableEntity
       position="-44000,0,0"
       scale="2500"
       collisionType="dynamic"
@@ -1212,22 +1212,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = "2"
       enablecollisiondamage = "false"
     >
-      <!--attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
-      </attached-->  <!-- Forcefield kills HYDROGEN FARMER-->
+      <attached>
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <!--attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached-->  <!-- Forcefield kills HYDROGEN FARMER-->
+        </Planet>
+      </attached>
       <collisionShapes>
         <SphereCollisionShape radius="2500" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
 
 <!-------------------------------------- The attack --------------------------------------->

Modified: code/branches/cegui0.8_ogre1.9/data/levels/planets.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/planets.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/planets.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -44,7 +44,7 @@
       pawndesign="spaceshipHXY"
     />
 
-    <Planet
+    <MovableEntity
       position="0,0,0"
       scale="1000"
       collisionType="dynamic"
@@ -52,24 +52,29 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="1000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
-    <Planet
+    <MovableEntity
       position="10000,0,0"
       scale="100"
       collisionType="dynamic"
@@ -77,21 +82,26 @@
       angularDamping="0"
       mass="5000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="1000" velocity="-500" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="100" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
   </Scene>
 </Level>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentation09.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentation09.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentation09.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -56,7 +56,11 @@
       <?lua end ?>
     <?lua end ?>
     
-    <Planet position="0,0,0" scale=10000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
+    <MovableEntity position="0,0,0" scale=10000 pitch=-90 rotationaxis="1,1,0" rotationrate="1">
+      <attached>
+        <Planet mesh="iceplanet.mesh" atmosphere="atmosphere1" atmospheresize=224.0f imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
 
   </Scene>
 </Level>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -110,7 +110,7 @@
     </SimpleNotification>
 
     <!-- EARTH -->
-    <Planet
+    <MovableEntity
       position="80500,0,0"
       scale="63000"
       collisionType="dynamic"
@@ -119,22 +119,27 @@
       mass="5.9e21"
       pitch="-90"
       yaw="50"
-      mesh="planets/earth.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,1,0"
       rotationrate="0.2"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" />
+        <Planet
+          mesh="planets/earth.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="63000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <!-- PARTICLE EFFECT -->
 
@@ -328,7 +333,7 @@
     <!-- MOON AREA -->
     
     <!-- MOON -->
-    <Planet
+    <MovableEntity
       position="-80000,0,0"
       scale="4000"
       collisionType="dynamic"
@@ -336,22 +341,27 @@
       angularDamping="0"
       mass="7.36e19"
       pitch="0"
-      mesh="planets/moon.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="0,1,0"
       rotationrate="0.2"
-      atmospheresize="0.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" />
+        <Planet
+          mesh="planets/moon.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="0.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="4000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <SimpleNotification message="Hydrogen farmer/space station by Hans" >
         <events>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationHS09.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationHS09.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationHS09.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -392,10 +392,6 @@
         </attached>
       </MovableEntity>
     <?lua end ?>
-    
-<!--
-    <Planet position="1000,0,0" mass=900000 scale=1000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
--->
 
   </Scene>
 </Level>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -352,7 +352,7 @@
         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
     ?>
 
-    <Planet
+    <MovableEntity
       position="15000,0,-1000"
       scale="5000"
       collisionType="dynamic"
@@ -360,22 +360,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/ganymede.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/ganymede.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
 <StaticEntity position="6750,-750,2000" yaw=0 pitch=0>
     <attached>

Modified: code/branches/cegui0.8_ogre1.9/data/levels/shadertest.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/shadertest.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/shadertest.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -77,7 +77,7 @@
 
     <!-- Planet close to spawn point -->
 
-    <Planet
+    <MovableEntity
       position="15000,0,-1000"
       scale="5000"
       collisionType="dynamic"
@@ -85,22 +85,27 @@
       angularDamping="0"
       mass="10000000"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
       rotationaxis="1,0,0"
       rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
       collisiondamage = 2
       enablecollisiondamage = true
     >
       <attached>
-        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+        <Planet
+          mesh="planets/muunilinst.mesh"
+          atmosphere="atmosphere1"
+          atmospheresize="80.0f"
+          imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+          </attached>
+        </Planet>
       </attached>
       <collisionShapes>
         <SphereCollisionShape radius="5000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
 
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -929,7 +929,7 @@
        asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 2000, 250, 0)
     ?>
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet1) ?>"
         scale="2000"
         collisionType="dynamic"
@@ -937,22 +937,27 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/muunilinst.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="2000" position="0,0,0" />
+        <Planet
+            mesh="planets/muunilinst.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="2000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")
@@ -959,7 +964,7 @@
         asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 0, 30, 20, 40, 2800, 3000, 200, 1)
     ?>
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet2) ?>"
         scale="3000"
         collisionType="dynamic"
@@ -967,22 +972,27 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/planet3.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="3000" position="0,0,0" />
+        <Planet
+            mesh="planets/planet3.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+          >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")

Modified: code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -879,7 +879,7 @@
 
     <!-- Planets -->
 
-   <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet1) ?>"
         scale="3000"
         collisionType="dynamic"
@@ -887,24 +887,29 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/muunilinst.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
-    visible=true
-    active=true
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
-        </attached>
-        <collisionShapes>
-            <SphereCollisionShape radius="3000" position="0,0,0" />
+        <Planet
+            mesh="planets/muunilinst.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=true
+            active=true
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")
@@ -911,7 +916,7 @@
         asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
     ?>
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cPlanet2) ?>"
         scale="2000"
         collisionType="dynamic"
@@ -919,24 +924,29 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/ganymede.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
-        visible=true
-        active=true
-      >
+    >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
-        </attached>
-          <collisionShapes>
-            <SphereCollisionShape radius="2000" position="0,0,0" />
+        <Planet
+            mesh="planets/ganymede.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=true
+            active=true
+        >
+          <attached>
+            <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+          </attached>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="2000" position="0,0,0" />
       </collisionShapes>
-    </Planet>
+    </MovableEntity>
 
     <?lua
         dofile("includes/asteroidField.lua")
@@ -945,7 +955,7 @@
 
     <!-- EnemyPlanet -->
 
-    <Planet
+    <MovableEntity
         position="<?lua printC(cEnemyBasePlanet) ?>"
         scale="5000"
         collisionType="dynamic"
@@ -953,21 +963,24 @@
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/jupiter.mesh"
-        atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
-        atmospheresize="80.0f"
-        imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
-        visible=false
-        active=false
     >
-        <attached>
+      <attached>
+        <Planet
+            mesh="planets/jupiter.mesh"
+            atmosphere="atmosphere1"
+            atmospheresize="80.0f"
+            imagesize="1024.0f"
+            visible=false
+            active=false
+        >
+          <attached>
            <ForceField position="0,0,0" rotationaxis="0.1,1,0.1"mode="sphere" diameter="10000" velocity="-500" />
-        </attached>
-        <events>
+          </attached>
+          <events>
             <activity>
                 <Trigger  name="enemyPlanetVisible" mode=and>
                    <EventTrigger>
@@ -1004,11 +1017,13 @@
                      </EventTrigger>
                  </Trigger>
             </visibility>
-        </events>
-        <collisionShapes>
-          <SphereCollisionShape position="0,0,0" radius=5000/>
-        </collisionShapes>
-    </Planet>
+          </events>
+        </Planet>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape position="0,0,0" radius=5000/>
+      </collisionShapes>
+    </MovableEntity>
 
     <!-- Pawn that represents the planet during destruction -->
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/testSwallow.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/testSwallow.oxw	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/data/levels/testSwallow.oxw	2018-02-20 23:03:52 UTC (rev 11795)
@@ -55,7 +55,11 @@
 end
 ?>
 <?lua end ?>
-    <Planet position="0,0,0" scale=10000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
+    <MovableEntity position="0,0,0" scale=10000 pitch=-90 rotationaxis="1,1,0" rotationrate="1" >
+      <attached>
+        <Planet mesh="iceplanet.mesh" atmosphere="atmosphere1" atmospheresize=224.0f imagesize=1024.0f />
+      </attached>
+    </MovableEntity>
 
   </Scene>
 </Level>

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/core/CMakeLists.txt	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/core/CMakeLists.txt	2018-02-20 23:03:52 UTC (rev 11795)
@@ -94,6 +94,7 @@
     CorePrecompiledHeaders.h
   LINK_LIBRARIES
     ${OGRE_LIBRARY}
+    ${OGRE_OVERLAY_LIBRARY}
     ${Boost_FILESYSTEM_LIBRARY}
     ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
     ${Boost_THREAD_LIBRARY}

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/core/GUIManager.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/core/GUIManager.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -481,6 +481,9 @@
     {
         assert(guiSystem_);
         this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectTimePulse, arg::_1, time.getDeltaTime()));
+#if CEGUI_VERSION >= 0x000800
+        this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectTimePulse, arg::_1, time.getDeltaTime()));
+#endif
     }
 
     /**
@@ -663,7 +666,7 @@
         if (imageSet.empty() || imageName.empty())
             this->setBackgroundImage("");
         else
-            this->setBackgroundImage("set: " + imageSet + " image: " + imageName);
+            this->setBackgroundImage(imageSet + "/" + imageName);
     }
 
     void GUIManager::setBackgroundImage(const std::string& image)
@@ -845,7 +848,7 @@
     template <typename FunctionType>
     bool GUIManager::protectedCeguiContextCall(FunctionType function)
     {
-        return this->protectedCall(function, this->guiSystem_->getDefaultGUIContext());
+        return this->protectedCall(function, &this->guiSystem_->getDefaultGUIContext());
     }
 #endif
 

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -44,6 +44,9 @@
 #include <OgreTextureManager.h>
 #include <OgreViewport.h>
 #include <OgreWindowEventUtilities.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlaySystem.h>
+#endif
 
 #include "SpecialConfig.h"
 #include "util/Clock.h"
@@ -114,6 +117,12 @@
         // Ogre setup procedure (creating Ogre::Root)
         this->loadOgreRoot();
 
+#if OGRE_VERSION >= 0x010900
+        this->overlaySystem_ = new Ogre::OverlaySystem();
+#else
+        this->overlaySystem_ = nullptr;
+#endif
+
         // At first, add the root paths of the data directories as resource locations
         Ogre::ResourceGroupManager::getSingleton().addResourceLocation(ConfigurablePaths::getDataPathString(), "FileSystem");
         // Load resources
@@ -154,6 +163,9 @@
         Loader::getInstance().unload(resources_.get());
         Loader::getInstance().unload(extResources_.get());
 
+#if OGRE_VERSION >= 0x010900
+        safeObjectDelete(&overlaySystem_);
+#endif
         safeObjectDelete(&ogreRoot_);
         safeObjectDelete(&ogreLogger_);
         safeObjectDelete(&ogreWindowEventListener_);

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/core/GraphicsManager.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -51,6 +51,7 @@
 #include <OgreLog.h>
 
 #include "util/DestructionHelper.h"
+#include "util/OgreForwardRefs.h"
 #include "util/Singleton.h"
 #include "config/Configurable.h"
 
@@ -78,8 +79,9 @@
 
         void postUpdate(const Clock& time);
 
-        Ogre::Viewport* getViewport()         { return this->viewport_; }
-        Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
+        Ogre::Viewport* getViewport()           { return this->viewport_; }
+        Ogre::RenderWindow* getRenderWindow()   { return this->renderWindow_; }
+        Ogre::OverlaySystem* getOverlaySystem() { return this->overlaySystem_; }
         size_t getRenderWindowHandle();
 
 // tolua_begin
@@ -128,6 +130,7 @@
         Ogre::Root*              ogreRoot_;                //!< Ogre's root
         Ogre::RenderWindow*      renderWindow_;            //!< the one and only render window
         Ogre::Viewport*          viewport_;                //!< default full size viewport
+        Ogre::OverlaySystem*     overlaySystem_;
         GlowMaterialListener*    glowMaterialListener_;    //!< Material Listener for the 'Glow' compositor
         float                    lastFrameStartTime_;      //!< Time stamp of the beginning of the last frame
         float                    lastFrameEndTime_;        //!< Time stamp of the end of the last frame

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/util/DisplayStringConversions.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/util/DisplayStringConversions.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/util/DisplayStringConversions.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -36,7 +36,12 @@
 #define _DisplayStringConversions_H__
 
 #include "UtilPrereqs.h"
-#include <OgreOverlayElement.h>
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayElement.h>
+#else
+#   include <OgreOverlayElement.h>
+#endif
 
 #if OGRE_UNICODE_SUPPORT
     #include <OgreUTFString.h>

Modified: code/branches/cegui0.8_ogre1.9/src/libraries/util/OgreForwardRefs.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/libraries/util/OgreForwardRefs.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/libraries/util/OgreForwardRefs.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -66,13 +66,11 @@
     class ExternalTextureSourceManager;
     class Factory;
     class Font;
-    class FontPtr;
     class FontManager;
     struct FrameEvent;
     class FrameListener;
     class Frustum;
     class GpuProgram;
-    class GpuProgramPtr;
     class GpuProgramManager;
     class GpuProgramUsage;
     class HardwareIndexBuffer;
@@ -81,7 +79,6 @@
     class HardwarePixelBuffer;
     class HardwarePixelBufferSharedPtr;
     class HighLevelGpuProgram;
-    class HighLevelGpuProgramPtr;
     class HighLevelGpuProgramManager;
     class HighLevelGpuProgramFactory;
     class IndexData;
@@ -95,7 +92,6 @@
     class ManualResourceLoader;
     class ManualObject;
     class Material;
-    class MaterialPtr;
     class MaterialManager;
     class MaterialScriptCompiler;
     class Math;
@@ -103,7 +99,6 @@
     class Matrix4;
     class MemoryManager;
     class Mesh;
-    class MeshPtr;
     class MeshSerializer;
     class MeshSerializerImpl;
     class MeshManager;
@@ -119,6 +114,7 @@
     class OverlayElement;
     class OverlayElementFactory;
     class OverlayManager;
+    class OverlaySystem;
     class Particle;
     class ParticleAffector;
     class ParticleAffectorFactory;
@@ -178,7 +174,6 @@
     class SimpleRenderable;
     class SimpleSpline;
     class Skeleton;
-    class SkeletonPtr;
     class SkeletonInstance;
     class SkeletonManager;
     class Sphere;
@@ -194,7 +189,6 @@
     class ExternalTextureSource;
     class TextureUnitState;
     class Texture;
-    class TexturePtr;
     class TextureFont;
     class TextureManager;
     class TransformKeyFrame;

Modified: code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -100,7 +100,7 @@
             this->data_ = nullptr;
         }
         if(!this->tempTexture_.isNull())
-            this->tempTexture_.freeMethod();
+            this->tempTexture_.setNull();
     }
     
     /**

Modified: code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -31,9 +31,13 @@
 
 #include "FlagHUD.h"
 
-#include <OgreOverlayManager.h>
-#include <OgreMaterialManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -30,7 +30,6 @@
 
 #include <OgreEntity.h>
 #include <OgreBillboardSet.h>
-#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
 #include "core/GameMode.h"
@@ -46,9 +45,10 @@
     /**
      * @brief Constructor
      */
-    Planet::Planet(Context* context) : MovableEntity(context)
+    Planet::Planet(Context* context) : Model(context)
     {
         RegisterObject(Planet);
+        this->setLodEnabled(false);
         this->registerVariables();
     }
 
@@ -57,8 +57,6 @@
      */
     Planet::~Planet()
     {
-        if (this->isInitialized() && this->mesh_.getEntity())
-            this->detachOgreObject(this->mesh_.getEntity());
     }
 
     void Planet::tick(float dt)
@@ -86,66 +84,21 @@
         SUPER(Planet, tick, dt);
     }
 
-    void Planet::changedMesh()
+    void Planet::changedAtmosphere()
     {
         if( GameMode::showsGraphics() )
         {
-            if (this->mesh_.getEntity())
-                this->detachOgreObject(this->mesh_.getEntity());
-
-            this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
-
-            if (this->mesh_.getEntity())
+            if (this->getMesh().getEntity())
             {
-                this->attachOgreObject(this->mesh_.getEntity());
-                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
-                this->mesh_.setVisible(this->isVisible());
+                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
 
-                float scaleFactor = this->getScale();
-
-#if OGRE_VERSION >= 0x010800
-                Ogre::ProgressiveMesh::LodValueList distList;
-#elif OGRE_VERSION >= 0x010700
-                Ogre::Mesh::LodValueList distList;
-#else
-                Ogre::Mesh::LodDistanceList distList;
-#endif
-
-                distList.push_back(10.0f*scaleFactor);
-                distList.push_back(19.0f*scaleFactor);
-                distList.push_back(27.0f*scaleFactor);
-                distList.push_back(34.0f*scaleFactor);
-                distList.push_back(40.0f*scaleFactor);
-                distList.push_back(45.0f*scaleFactor);
-                distList.push_back(49.0f*scaleFactor);
-                distList.push_back(52.0f*scaleFactor);
-                distList.push_back(54.0f*scaleFactor);
-                distList.push_back(55.0f*scaleFactor);
-
-                float reductionValue = 0.2f;
-
-#if OGRE_VERSION >= 0x010800
-                Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
-                    reductionValue);
-#else
-                this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
-#endif
-                billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
-
                 this->attachOgreObject(this->billboard_.getBillboardSet());
                 this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
-                this->setCastShadows(true);
-                this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
-                this->mesh_.setCastShadows(true);
+                this->billboard_.getBillboardSet()->setRenderQueueGroup(this->getMesh().getEntity()->getRenderQueueGroup());
             }
         }
     }
 
-    void Planet::changedShadows()
-    {
-        this->mesh_.setCastShadows(this->bCastShadows_);
-    }
-
     void Planet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(Planet, XMLPort, xmlelement, mode);
@@ -153,27 +106,19 @@
         XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
         XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);
         XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);
-        XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
-        XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     }
 
     void Planet::registerVariables()
     {
-        registerVariable(this->atmosphere_, VariableDirection::ToClient);
+        registerVariable(this->atmosphere_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedAtmosphere));
         registerVariable(this->atmosphereSize, VariableDirection::ToClient);
         registerVariable(this->imageSize, VariableDirection::ToClient);
-        // Note: the meshSrc should be synchronised after atmosphere and other values, because the meshSrc callback setts the atmosphere billboards
-        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
-        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
     }
 
     void Planet::changedVisibility()
     {
         SUPER(Planet, changedVisibility);
-        if (this->isInitialized())
-        {
-            this->mesh_.setVisible(this->isVisible());
-            this->billboard_.setVisible(this->isVisible());
-        }
+
+        this->billboard_.setVisible(this->isVisible());
     }
 }

Modified: code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -39,12 +39,12 @@
 
 #include <string>
 #include "tools/BillboardSet.h"
-#include "tools/Mesh.h"
-#include "worldentities/MovableEntity.h"
+#include "tools/interfaces/Tickable.h"
+#include "graphics/Model.h"
 
 namespace orxonox
 {
-    class _ObjectsExport Planet : public MovableEntity
+    class _ObjectsExport Planet : public Model, public Tickable
     {
         public:
             Planet(Context* context);
@@ -57,22 +57,6 @@
 
             virtual void changedVisibility() override;
 
-            inline void setMeshSource(const std::string& meshname)
-                { this->meshSrc_ = meshname; this->changedMesh(); }
-
-            inline const std::string& getMeshSource() const
-                { return this->meshSrc_; }
-
-            inline void setCastShadows(bool bCastShadows)
-                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
-
-            inline bool getCastShadows() const
-                { return this->bCastShadows_; }
-
-            inline const std::string& getMesh() const{
-                return this->meshSrc_;
-            }
-
             inline void setAtmosphereSize(float size){
                 this->atmosphereSize = size;
             }
@@ -83,6 +67,7 @@
 
             inline void setAtmosphere(const std::string& atmosphere){
                 this->atmosphere_ = atmosphere;
+                this->changedAtmosphere();
             }
 
             inline const std::string& getAtmosphere(){
@@ -102,16 +87,12 @@
         private:
             void registerVariables();
 
-            void changedMesh();
-            void changedShadows();
+            void changedAtmosphere();
 
-            std::string meshSrc_;
             std::string atmosphere_;
-            Mesh mesh_;
             float atmosphereSize;
             float imageSize;
             BillboardSet billboard_;
-            bool bCastShadows_;
 
     };
 }

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -28,7 +28,11 @@
 
 #include "FadeoutText.h"
 
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -28,9 +28,15 @@
 
 #include "OverlayText.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -29,8 +29,13 @@
 #include "ChatOverlay.h"
 
 #include <string>
-#include <OgreTextAreaOverlayElement.h>
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
+
 #include "util/Convert.h"
 #include "util/DisplayStringConversions.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -32,8 +32,14 @@
 #include "overlays/OverlaysPrereqs.h"
 
 #include <list>
-#include <OgreOverlayElement.h>
 
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayElement.h>
+#else
+#   include <OgreOverlayElement.h>
+#endif
+
 #include "chat/ChatListener.h"
 #include "overlays/OverlayText.h"
 

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -31,12 +31,18 @@
 
 #include "HUDBar.h"
 
-#include <OgreOverlayManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>
 #include <OgrePass.h>
-#include <OgrePanelOverlayElement.h>
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
+
 #include "util/Convert.h"
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"
@@ -247,4 +253,14 @@
     {
         return this->icon_->getMaterialName();
     }
+
+    void HUDBar::setIconPosition(Vector2 position)
+    {
+        this->icon_->setPosition(position.x, position.y);
+    }
+
+    void HUDBar::setIconDimensions(Vector2 dimensions)
+    {
+        this->icon_->setDimensions(dimensions.x, dimensions.y);
+    }
 }

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -36,7 +36,6 @@
 
 #include <map>
 #include <vector>
-#include <OgrePanelOverlayElement.h>
 
 #include "util/Math.h"
 #include "util/OgreForwardRefs.h"
@@ -121,10 +120,8 @@
         inline const ColourValue& getCurrentBarColour() const
             { return this->currentColour_; }
 
-        inline void setIconPosition(Vector2 position)
-            { this->icon_->setPosition(position.x, position.y); }
-        inline void setIconDimensions(Vector2 dimensions)
-            { this->icon_->setDimensions(dimensions.x, dimensions.y); }
+        void setIconPosition(Vector2 position);
+        void setIconDimensions(Vector2 dimensions);
 
     protected:
         virtual void valueChanged();

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -31,11 +31,19 @@
 #include "HUDNavigation.h"
 
 #include <OgreCamera.h>
-#include <OgreFontManager.h>
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreFontManager.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
+
 #include <typeinfo>
 
 #include "util/Math.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -30,8 +30,13 @@
 
 #include "HUDRadar.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Math.h"
 #include "util/StringUtils.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -28,6 +28,14 @@
 
 #include "HUDWeapon.h"
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
+
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "util/Convert.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -35,9 +35,6 @@
 #include <vector>
 #include <string>
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
-
 #include "overlays/OrxonoxOverlay.h"
 #include "tools/interfaces/Tickable.h"
 #include "worldentities/pawns/Pawn.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -28,6 +28,14 @@
 
 #include "HUDWeaponMode.h"
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
+
 #include "util/Convert.h"
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -36,9 +36,6 @@
 #include <vector>
 #include <string>
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
-
 #include "overlays/OrxonoxOverlay.h"
 #include "overlays/OverlayText.h"
 #include "tools/interfaces/Tickable.h"

Modified: code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -29,9 +29,15 @@
 #include "Stats.h"
 
 #include <string>
-#include <OgreOverlayManager.h>
-#include <OgreBorderPanelOverlayElement.h>
 
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreBorderPanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgreBorderPanelOverlayElement.h>
+#endif
+
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"
 #include "core/config/ConfigValueIncludes.h"

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/CMakeLists.txt	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/CMakeLists.txt	2018-02-20 23:03:52 UTC (rev 11795)
@@ -70,6 +70,7 @@
     OrxonoxPrecompiledHeaders.h
   LINK_LIBRARIES
     ${OGRE_LIBRARY}
+    ${OGRE_OVERLAY_LIBRARY}
     ${CEGUI}
     ${LUA5.1_LIBRARY}
     ${CEGUI_TOLUA_LIBRARY}

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/RenderQueueListener.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/RenderQueueListener.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/RenderQueueListener.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -82,6 +82,9 @@
             renderSystem->setStencilCheckEnabled(true); 
             renderSystem->setStencilBufferParams(Ogre::CMPF_ALWAYS_PASS,
                 STENCIL_VALUE_FOR_GLOW, STENCIL_FULL_MASK, 
+#if OGRE_VERSION >= 0x010900
+                STENCIL_FULL_MASK,
+#endif
                 Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false);       
         } 
         if (queueGroupId == RENDER_QUEUE_STENCIL_GLOW)
@@ -90,6 +93,9 @@
             renderSystem->setStencilCheckEnabled(true); 
             renderSystem->setStencilBufferParams(Ogre::CMPF_NOT_EQUAL,
                 STENCIL_VALUE_FOR_GLOW, STENCIL_FULL_MASK, 
+#if OGRE_VERSION >= 0x010900
+                STENCIL_FULL_MASK,
+#endif
                 Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false);       
         }
         if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==PixelState::READY_FOR_RENDER)
@@ -120,4 +126,4 @@
             this->pixelState_=PixelState::READY_FOR_ACCESS;
         }
     }
-}
\ No newline at end of file
+}

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/Scene.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/Scene.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/Scene.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -39,6 +39,9 @@
 #include <OgreSceneManager.h>
 #include <OgreSceneManagerEnumerator.h>
 #include <OgreSceneNode.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlaySystem.h>
+#endif
 
 #include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
 #include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
@@ -89,6 +92,9 @@
             this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
             this->renderQueueListener_ = new RenderQueueListener();
             this->sceneManager_->addRenderQueueListener(this->renderQueueListener_);//add our own renderQueueListener
+#if OGRE_VERSION >= 0x010900
+            this->sceneManager_->addRenderQueueListener(GraphicsManager::getInstance().getOverlaySystem());
+#endif
 
             this->radar_ = new Radar();
             this->glowShader_ = new GlobalShader(this);
@@ -133,6 +139,9 @@
 
             if (GameMode::showsGraphics())
             {
+#if OGRE_VERSION >= 0x010900
+                this->sceneManager_->removeRenderQueueListener(GraphicsManager::getInstance().getOverlaySystem());
+#endif
                 this->sceneManager_->removeRenderQueueListener(this->renderQueueListener_);
                 delete this->renderQueueListener_;
                 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/chat/ChatInputHandler.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/chat/ChatInputHandler.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -130,17 +130,34 @@
 
     /* GET WINDOW POINTERS */
 #if CEGUI_VERSION >= 0x000800
-    input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/input" );
-    inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" );
-    CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" );
+    //input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "ChatBox/input" );
+    //const CEGUI::Window* root = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild("MenuRootWindow");
+    //std::cout << "Count: " << root->getChildCount() << std::endl;
+    //for (int i = 0; i < root->getChildCount(); ++i) {
+    //	std::cout << "Child: " << root->getChildAtIdx(i)->getName() << std::endl;
+    //}
+    for (auto iterator = CEGUI::WindowManager::getSingleton().getIterator(); !iterator.isAtEnd(); iterator++) {
+    	CEGUI::Window* currentWindow = iterator.getCurrentValue();
+    	if (currentWindow->getName().compare("ChatBox") == 0) {
+    		input = currentWindow->getChild("frame")->getChild("input");
+    		CEGUI::Window* history = currentWindow->getChild("frame")->getChild("history");
+    		lb_history = dynamic_cast<CEGUI::Listbox*>(history);
+    	} else if (currentWindow->getName().compare("ChatBox-inputonly") == 0) {
+    		inputonly = currentWindow->getChild("input");
+    	}
+    }
+
+    //input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "ChatBox" )->getChild("frame")->getChild("input");
+    //inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" );
+    //CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" );
 #else
     input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
     inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
     CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
-#endif
 
     /* cast it to a listbox */
     lb_history = dynamic_cast<CEGUI::Listbox*>(history);
+#endif
 
     /* assert wee */
     assert( lb_history );

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/controllers/NewHumanController.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/controllers/NewHumanController.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -396,7 +396,12 @@
                 WorldEntity* wePtr;
                 try
                 {
-                    wePtr = orxonox_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny()));
+#if OGRE_VERSION >= 0x010900
+                    const Ogre::Any& any = itr->movable->getUserObjectBindings().getUserAny();
+#else
+                    const Ogre::Any& any = itr->movable->getUserAny();
+#endif
+                    wePtr = orxonox_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(any));
                 }
                 catch (...)
                 {

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/AnimatedModel.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/AnimatedModel.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/AnimatedModel.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -48,8 +48,8 @@
 
     AnimatedModel::~AnimatedModel()
     {
-        if (this->isInitialized() && this->mesh_.getEntity())
-            this->detachOgreObject(this->mesh_.getEntity());
+        if (this->isInitialized() && this->getMesh().getEntity())
+            this->detachOgreObject(this->getMesh().getEntity());
     }
 
     void AnimatedModel::XMLPort(Element& xmlelement, XMLPort::Mode mode)
@@ -65,17 +65,17 @@
     {
         if (GameMode::showsGraphics())
         {
-            if (this->mesh_.getEntity())
-                this->detachOgreObject(this->mesh_.getEntity());
+            if (this->getMesh().getEntity())
+                this->detachOgreObject(this->getMesh().getEntity());
 
-            this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
+            this->getMesh().setMeshSource(this->getScene()->getSceneManager(), this->getMeshSource());
 
-            if (this->mesh_.getEntity())
+            if (this->getMesh().getEntity())
             {
-                this->attachOgreObject(this->mesh_.getEntity());
-                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+                this->attachOgreObject(this->getMesh().getEntity());
+                this->getMesh().getEntity()->setCastShadows(this->getCastShadows());
                 this->setAnimationState(this->bAnimLoop_, this->bAnimEnabled_, this->anims_);
-                this->mesh_.setVisible(this->isVisible());
+                this->getMesh().setVisible(this->isVisible());
             }
         }
     }
@@ -88,9 +88,9 @@
     {
         if(state!="")
         {
-        if(this->mesh_.getEntity()->getAnimationState(state))
+        if(this->getMesh().getEntity()->getAnimationState(state))
         {
-        Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(state);
+        Ogre::AnimationState* as = this->getMesh().getEntity()->getAnimationState(state);
         as->setLoop(loop);
         as->setEnabled(enabled);
         this->anims_ = state;
@@ -108,11 +108,11 @@
     }
     void AnimatedModel::tick(float dt)
     {
-        if(this->mesh_.getEntity()->getAnimationState(anims_))
+        if(this->getMesh().getEntity()->getAnimationState(anims_))
         {
 // Test to change Material at runtime!
 
-//            Ogre::MaterialPtr mat = this->mesh_.getEntity()->getSubEntity(0)->getMaterial();
+//            Ogre::MaterialPtr mat = this->getMesh().getEntity()->getSubEntity(0)->getMaterial();
 //            mat->setDiffuse(0.4, 0.3, 0.1, 0.1);
 //            mat->setAmbient(0.3, 0.7, 0.8);
 //            mat->setSpecular(0.5, 0.5, 0.5, 0.1);
@@ -120,7 +120,7 @@
 //
 //            mat->setSceneBlending(sbt);
 
-            Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(anims_);
+            Ogre::AnimationState* as = this->getMesh().getEntity()->getAnimationState(anims_);
             as->addTime(dt);
     }
 }

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Camera.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Camera.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Camera.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -61,7 +61,12 @@
             ThrowException(AbortLoading, "Can't create Camera, no root-scene-node given.");
 
         this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString());
-        static_cast<Ogre::MovableObject*>(this->camera_)->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+        Ogre::MovableObject* movable = static_cast<Ogre::MovableObject*>(this->camera_);
+#if OGRE_VERSION >= 0x010900
+        movable->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#else
+        movable->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#endif
         this->cameraNode_ = this->getScene()->getRootSceneNode()->createChildSceneNode();
         this->attachNode(this->cameraNode_);
         this->cameraNode_->attachObject(this->camera_);

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -29,7 +29,12 @@
 #include "Model.h"
 
 #include <OgreEntity.h>
-#include <OgreProgressiveMesh.h>
+#if OGRE_VERSION >= 0x010900
+#   include <OgreProgressiveMeshGenerator.h>
+#   include <OgreDistanceLodStrategy.h>
+#else
+#   include <OgreProgressiveMesh.h>
+#endif
 
 #include "core/CoreIncludes.h"
 #include "core/config/ConfigValueIncludes.h"
@@ -202,21 +207,11 @@
             if( this->bLodEnabled_ )
             {
                 float volume = this->mesh_.getEntity()->getBoundingBox().volume();
-/*
-                float scaleFactor = 1;
-
-                BaseObject* creatorPtr = this;
-
-                while(creatorPtr!=nullptr&&orxonox_cast<WorldEntity*>(creatorPtr))
-                {
-                    scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
-                    creatorPtr = creatorPtr->getCreator();
-                }
-                orxout() << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
-*/
                 orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl;
 
-#if OGRE_VERSION >= 0x010800
+#if OGRE_VERSION >= 0x010900
+                Ogre::LodConfig::LodLevelList distList;
+#elif OGRE_VERSION >= 0x010800
                 Ogre::ProgressiveMesh::LodValueList distList;
 #elif OGRE_VERSION >= 0x010700
                 Ogre::Mesh::LodValueList distList;
@@ -226,27 +221,34 @@
 
                 if( lodLevel_>0 )
                 {
-//                    float factor = scaleFactor*5/lodLevel_;
                     float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_;
 
                     orxout(verbose, context::lod) << "LodLevel set with factor: " << factor << endl;
 
-                    distList.push_back(70.0f*factor);
-                    distList.push_back(140.0f*factor);
-                    distList.push_back(170.0f*factor);
-                    distList.push_back(200.0f*factor);
-                    distList.push_back(230.0f*factor);
-                    distList.push_back(250.0f*factor);
-                    distList.push_back(270.0f*factor);
-                    distList.push_back(290.0f*factor);
-                    distList.push_back(310.0f*factor);
-                    distList.push_back(330.0f*factor);
+                    addLodDistanceToList(distList, 70.0f*factor);
+                    addLodDistanceToList(distList, 140.0f*factor);
+                    addLodDistanceToList(distList, 170.0f*factor);
+                    addLodDistanceToList(distList, 200.0f*factor);
+                    addLodDistanceToList(distList, 230.0f*factor);
+                    addLodDistanceToList(distList, 250.0f*factor);
+                    addLodDistanceToList(distList, 270.0f*factor);
+                    addLodDistanceToList(distList, 290.0f*factor);
+                    addLodDistanceToList(distList, 310.0f*factor);
+                    addLodDistanceToList(distList, 330.0f*factor);
                     while(distList.size()>this->numLodLevels_)
                         distList.pop_back();
 
 
                     //Generiert LOD-Levels
-#if OGRE_VERSION >= 0x010800
+#if OGRE_VERSION >= 0x010900
+                    Ogre::LodConfig config;
+                    config.mesh = this->mesh_.getEntity()->getMesh();
+                    config.levels = distList;
+                    config.strategy = Ogre::DistanceLodSphereStrategy::getSingletonPtr();
+
+                    Ogre::ProgressiveMeshGenerator generator;
+                    generator.generateLodLevels(config);
+#elif OGRE_VERSION >= 0x010800
                     Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
                         this->lodReductionRate_);
 #else
@@ -269,4 +271,14 @@
         }
 #endif
     }
+
+    template <class T>
+    void Model::addLodDistanceToList(T& list, float distance)
+    {
+#if OGRE_VERSION >= 0x010900
+        list.push_back({distance, Ogre::LodLevel::VRM_COLLAPSE_COST, this->lodReductionRate_, 0, false});
+#else
+        list.push_back(distance);
+#endif
+    }
 }

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.h	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/graphics/Model.h	2018-02-20 23:03:52 UTC (rev 11795)
@@ -88,6 +88,13 @@
             void setSubMaterial(const std::string& name, const int index);
 
         protected:
+            inline Mesh& getMesh()
+                { return this->mesh_; }
+
+            inline void setLodEnabled(bool bLodEnabled)
+                { this->bLodEnabled_ = bLodEnabled; }
+
+        private:
             /**
             @brief
                 This function turns a string from XML Port into a usable ID for the rendering system
@@ -108,6 +115,9 @@
             //LoD
             void enableLod();
 
+            template <class T>
+            void addLodDistanceToList(T& list, float distance);
+
             inline void setLodLevel(float lodLevel)
                 { this->lodLevel_ =  lodLevel; }
             inline float getLodLevel() const

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/InGameConsole.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/InGameConsole.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -31,14 +31,26 @@
 
 #include <algorithm>
 #include <string>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgreFontManager.h>
-#include <OgreFont.h>
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlay.h>
+#   include <Overlay/OgreOverlayElement.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreOverlayContainer.h>
+#   include <Overlay/OgreBorderPanelOverlayElement.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreFont.h>
+#else
+#   include <OgreOverlay.h>
+#   include <OgreOverlayElement.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreOverlayContainer.h>
+#   include <OgreBorderPanelOverlayElement.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgreFontManager.h>
+#   include <OgreFont.h>
+#endif
 
 #include "util/Clock.h"
 #include "util/Convert.h"

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -34,9 +34,15 @@
 #include "OrxonoxOverlay.h"
 
 #include <cmath>
-#include <OgreOverlay.h>
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlay.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlay.h>
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 #include <OgreRenderWindow.h>
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>

Modified: code/branches/cegui0.8_ogre1.9/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/orxonox/worldentities/WorldEntity.cc	2018-02-20 22:55:06 UTC (rev 11794)
+++ code/branches/cegui0.8_ogre1.9/src/orxonox/worldentities/WorldEntity.cc	2018-02-20 23:03:52 UTC (rev 11795)
@@ -547,7 +547,11 @@
     void WorldEntity::attachOgreObject(Ogre::MovableObject* object)
     {
         this->node_->attachObject(object);
+#if OGRE_VERSION >= 0x010900
+        object->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#else
         object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#endif
     }
 
     void WorldEntity::attachOgreObject(Ogre::BillboardSet* object)
@@ -562,7 +566,11 @@
     //! Detaches an Ogre::MovableObject from this WorldEntity.
     void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
     {
+#if OGRE_VERSION >= 0x010900
+        object->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
+#else
         object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
+#endif
         this->node_->detachObject(object);
     }
 



More information about the Orxonox-commit mailing list