Index: code/branches/libs/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- code/branches/libs/src/orxonox/chat/ChatInputHandler.cc	(revision 9668)
+++ code/branches/libs/src/orxonox/chat/ChatInputHandler.cc	(revision 9671)
@@ -31,9 +31,18 @@
 #include <cassert>
 #include <string>
-#include <CEGUIWindow.h>
-#include <CEGUIWindowManager.h>
-#include <elements/CEGUIListbox.h>
-#include <elements/CEGUIListboxItem.h>
-#include <elements/CEGUIListboxTextItem.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/Window.h>
+#   include <CEGUI/WindowManager.h>
+#   include <CEGUI/widgets/Listbox.h>
+#   include <CEGUI/widgets/ListboxItem.h>
+#   include <CEGUI/widgets/ListboxTextItem.h>
+#else
+#   include <CEGUIWindow.h>
+#   include <CEGUIWindowManager.h>
+#   include <elements/CEGUIListbox.h>
+#   include <elements/CEGUIListboxItem.h>
+#   include <elements/CEGUIListboxTextItem.h>
+#endif
 
 #include "util/ScopedSingletonManager.h"
@@ -118,9 +127,13 @@
 
     /* 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" );
+#else
     input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
     inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
-
-    /* get pointer to the history window */
     CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
+#endif
 
     /* cast it to a listbox */
@@ -141,5 +154,5 @@
     // reds
     for( i = 0; i < NumberOfColors/3; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       green += 0.2f, blue += 0.2f;
     }
@@ -148,5 +161,5 @@
     red = 0.5, green = 1, blue = 0.5;
     for( ; i < NumberOfColors*2/3; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       red += 0.2f, blue += 0.2f;
     }
@@ -155,5 +168,5 @@
     red = 0.5, green = 0.5, blue = 1;
     for( ; i < NumberOfColors; ++i )
-    { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
+    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
       red += 0.2f, green += 0.2f;
     }
@@ -272,6 +285,9 @@
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
+#if CEGUI_VERSION >= 0x000800
+      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
+#else
+      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
+#endif
       this->input->setProperty( "Text", assembled.substr( disp_offset ) );
     }
@@ -279,6 +295,9 @@
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
+#if CEGUI_VERSION >= 0x000800
+      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
+#else
+      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
+#endif
       this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
     }
Index: code/branches/libs/src/orxonox/chat/ChatInputHandler.h
===================================================================
--- code/branches/libs/src/orxonox/chat/ChatInputHandler.h	(revision 9668)
+++ code/branches/libs/src/orxonox/chat/ChatInputHandler.h	(revision 9671)
@@ -33,6 +33,12 @@
 
 #include <string>
-#include <CEGUIForwardRefs.h>
-#include <CEGUIcolour.h>
+
+#if CEGUI_VERSION >= 0x000800
+#   include <CEGUI/ForwardRefs.h>
+#   include <CEGUI/Colour.h>
+#else
+#   include <CEGUIForwardRefs.h>
+#   include <CEGUIcolour.h>
+#endif
 
 #include "util/Singleton.h"
@@ -41,4 +47,11 @@
 namespace orxonox // tolua_export
 { // tolua_export
+
+#if CEGUI_VERSION >= 0x000800
+  typedef CEGUI::Colour CEGUIColour;
+#else
+  typedef CEGUI::colour CEGUIColour;
+#endif
+
   /* class to handle chat using an InputBuffer */
   class _OrxonoxExport ChatInputHandler  // tolua_export
@@ -55,5 +68,5 @@
       /* colors for nickname coloring */
       static const int NumberOfColors = 10;
-      CEGUI::colour text_colors[ NumberOfColors ];
+      CEGUIColour text_colors[ NumberOfColors ];
 
       /** input state */
