Changeset 8079 for code/trunk/src/orxonox/ChatInputHandler.cc
- Timestamp:
- Mar 15, 2011, 9:47:11 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/ChatInputHandler.cc
r7284 r8079 28 28 29 29 #include "ChatInputHandler.h" 30 31 #include <cassert> 32 #include <string> 33 #include <CEGUIWindow.h> 34 #include <CEGUIWindowManager.h> 35 #include <elements/CEGUIListbox.h> 36 #include <elements/CEGUIListboxItem.h> 37 #include <elements/CEGUIListboxTextItem.h> 38 30 39 #include "util/ScopedSingletonManager.h" 31 40 #include "core/CoreIncludes.h" 32 41 #include "core/GUIManager.h" 33 #include "core/CorePrereqs.h"34 42 #include "core/command/ConsoleCommand.h" 35 #include <CEGUIWindow.h> 36 #include <elements/CEGUIListbox.h> 37 #include <elements/CEGUIListboxItem.h> 38 #include <elements/CEGUIListboxTextItem.h> 39 #include <CEGUIWindowManager.h> 40 #include <string> 43 #include "core/input/InputBuffer.h" 44 #include "core/input/InputManager.h" 45 #include "core/input/InputState.h" 46 #include "network/Host.h" 47 48 #include "PlayerManager.h" 49 #include "infos/PlayerInfo.h" 41 50 42 51 namespace orxonox … … 72 81 this->inputState = InputManager::getInstance().createInputState( "chatinput", false, false, InputStatePriority::Dynamic ); 73 82 this->inputState->setKeyHandler(this->inpbuf); 83 } 84 85 ChatInputHandler::~ChatInputHandler() 86 { 87 /* Clean up */ 88 InputManager::getInstance().destroyState("chatinput"); 89 delete this->inpbuf; 74 90 } 75 91 … … 125 141 // reds 126 142 for( i = 0; i < NumberOfColors/3; ++i ) 127 { this->text_colors[ i ] = new CEGUI::colour( red, green, blue ); 128 assert( this->text_colors[ i ] ); 143 { this->text_colors[ i ] = CEGUI::colour( red, green, blue ); 129 144 green += 0.2f, blue += 0.2f; 130 145 } … … 133 148 red = 0.5, green = 1, blue = 0.5; 134 149 for( ; i < NumberOfColors*2/3; ++i ) 135 { this->text_colors[ i ] = new CEGUI::colour( red, green, blue ); 136 assert( this->text_colors[ i ] ); 150 { this->text_colors[ i ] = CEGUI::colour( red, green, blue ); 137 151 red += 0.2f, blue += 0.2f; 138 152 } … … 141 155 red = 0.5, green = 0.5, blue = 1; 142 156 for( ; i < NumberOfColors; ++i ) 143 { this->text_colors[ i ] = new CEGUI::colour( red, green, blue ); 144 assert( this->text_colors[ i ] ); 157 { this->text_colors[ i ] = CEGUI::colour( red, green, blue ); 145 158 red += 0.2f, green += 0.2f; 146 159 } … … 196 209 197 210 /* set the color according to the hash */ 198 tocolor->setTextColours( *(this->text_colors[ hash ]));211 tocolor->setTextColours( this->text_colors[ hash ] ); 199 212 } 200 213
Note: See TracChangeset
for help on using the changeset viewer.