Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2013, 11:03:33 PM (11 years ago)
Author:
landauf
Message:

merged branch 'libs' back to trunk. orxonox now compiles and runs with ogre 1.8 and it compiles (but doesn't run) with cegui 0.8

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/chat/ChatInputHandler.cc

    r9672 r9675  
    3232#include <cstddef>
    3333#include <string>
    34 #include <CEGUIWindow.h>
    35 #include <CEGUIWindowManager.h>
    36 #include <elements/CEGUIListbox.h>
    37 #include <elements/CEGUIListboxItem.h>
    38 #include <elements/CEGUIListboxTextItem.h>
     34
     35#if CEGUI_VERSION >= 0x000800
     36#   include <CEGUI/Window.h>
     37#   include <CEGUI/WindowManager.h>
     38#   include <CEGUI/widgets/Listbox.h>
     39#   include <CEGUI/widgets/ListboxItem.h>
     40#   include <CEGUI/widgets/ListboxTextItem.h>
     41#else
     42#   include <CEGUIWindow.h>
     43#   include <CEGUIWindowManager.h>
     44#   include <elements/CEGUIListbox.h>
     45#   include <elements/CEGUIListboxItem.h>
     46#   include <elements/CEGUIListboxTextItem.h>
     47#endif
    3948
    4049#include "util/ScopedSingletonManager.h"
     
    119128
    120129    /* GET WINDOW POINTERS */
     130#if CEGUI_VERSION >= 0x000800
     131    input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/input" );
     132    inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" );
     133    CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" );
     134#else
    121135    input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
    122136    inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
    123 
    124     /* get pointer to the history window */
    125137    CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
     138#endif
    126139
    127140    /* cast it to a listbox */
     
    142155    // reds
    143156    for( i = 0; i < NumberOfColors/3; ++i )
    144     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     157    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    145158      green += 0.2f, blue += 0.2f;
    146159    }
     
    149162    red = 0.5, green = 1, blue = 0.5;
    150163    for( ; i < NumberOfColors*2/3; ++i )
    151     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     164    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    152165      red += 0.2f, blue += 0.2f;
    153166    }
     
    156169    red = 0.5, green = 0.5, blue = 1;
    157170    for( ; i < NumberOfColors; ++i )
    158     { this->text_colors[ i ] = CEGUI::colour( red, green, blue );
     171    { this->text_colors[ i ] = CEGUIColour( red, green, blue );
    159172      red += 0.2f, green += 0.2f;
    160173    }
     
    273286    {
    274287      /* adjust curser position - magic number 5 for font width */
    275       sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
    276         cursorpos, assembled.length() );
     288#if CEGUI_VERSION >= 0x000800
     289      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
     290#else
     291      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
     292#endif
    277293      this->input->setProperty( "Text", assembled.substr( disp_offset ) );
    278294    }
     
    280296    {
    281297      /* adjust curser position - magic number 5 for font width */
    282       sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
    283         cursorpos, assembled.length() );
     298#if CEGUI_VERSION >= 0x000800
     299      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().get().getWidth()/6), cursorpos, assembled.length() );
     300#else
     301      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6), cursorpos, assembled.length() );
     302#endif
    284303      this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
    285304    }
  • code/trunk/src/orxonox/chat/ChatInputHandler.h

    r8858 r9675  
    3333
    3434#include <string>
    35 #include <CEGUIForwardRefs.h>
    36 #include <CEGUIcolour.h>
     35
     36#if CEGUI_VERSION >= 0x000800
     37#   include <CEGUI/ForwardRefs.h>
     38#   include <CEGUI/Colour.h>
     39#else
     40#   include <CEGUIForwardRefs.h>
     41#   include <CEGUIcolour.h>
     42#endif
    3743
    3844#include "util/Singleton.h"
     
    4147namespace orxonox // tolua_export
    4248{ // tolua_export
     49
     50#if CEGUI_VERSION >= 0x000800
     51  typedef CEGUI::Colour CEGUIColour;
     52#else
     53  typedef CEGUI::colour CEGUIColour;
     54#endif
     55
    4356  /* class to handle chat using an InputBuffer */
    4457  class _OrxonoxExport ChatInputHandler  // tolua_export
     
    5568      /* colors for nickname coloring */
    5669      static const int NumberOfColors = 10;
    57       CEGUI::colour text_colors[ NumberOfColors ];
     70      CEGUIColour text_colors[ NumberOfColors ];
    5871
    5972      /** input state */
Note: See TracChangeset for help on using the changeset viewer.