Changeset 6870
- Timestamp:
- May 10, 2010, 1:47:44 PM (15 years ago)
- Location:
- code/branches/chat2
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/chat2/data/gui/layouts/ChatBox-inputonly.layout
r6866 r6870 2 2 3 3 <GUILayout > 4 <Window Type="DefaultWindow" Name=" Root" >4 <Window Type="DefaultWindow" Name="orxonox/ChatBox-inputonly/Root" > 5 5 <Property Name="InheritsAlpha" Value="False" /> 6 6 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 7 7 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 8 <Window Type="MenuWidgets/FrameWindow" Name="/ChatBox" > 9 <Property Name="Text" Value="Chat" /> 10 <Property Name="InheritsAlpha" Value="False" /> 8 <Window Type="MenuWidgets/Editbox" Name="orxonox/ChatBox-inputonly/input" > 9 <Property Name="Text" Value="" /> 10 <Property Name="AlwaysOnTop" Value="True" /> 11 <Property Name="MaxTextLength" Value="1073741823" /> 11 12 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 <Property Name="TitlebarEnabled" Value="True" /> 13 <Property Name="UnifiedAreaRect" Value="{{0.01,0},{0.03,0},{0.6,0},{0.69375,0}}" /> 14 <Window Type="MenuWidgets/Listbox" Name="orxonox/ChatBox/history" > 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.078,0},{0.98,0},{1,-30}}" /> 17 </Window> 18 <Window Type="MenuWidgets/Editbox" Name="orxonox/ChatBox/input" > 19 <Property Name="Text" Value="" /> 20 <Property Name="MaxTextLength" Value="1073741823" /> 21 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 22 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{1,-30},{0.98,0},{1,-5}}" /> 23 </Window> 13 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0,5},{0.98,0},{0,30}}" /> 24 14 </Window> 25 15 </Window> -
code/branches/chat2/data/gui/layouts/ChatBox.layout
r6846 r6870 2 2 3 3 <GUILayout > 4 <Window Type="DefaultWindow" Name=" Root" >4 <Window Type="DefaultWindow" Name="orxonox/ChatBox/Root" > 5 5 <Property Name="InheritsAlpha" Value="False" /> 6 6 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> -
code/branches/chat2/data/gui/scripts/ChatBox-inputonly.lua
r6866 r6870 1 -- ChatBox .lua1 -- ChatBox-inputonly.lua 2 2 3 local P = createMenuSheet("ChatBox ")3 local P = createMenuSheet("ChatBox-inputonly") 4 4 return P 5 5 -
code/branches/chat2/src/orxonox/ChatInputHandler.cc
r6846 r6870 46 46 SetConsoleCommandAlias( ChatInputHandler, activate_static, "startchat", 47 47 true ); 48 SetConsoleCommandAlias( ChatInputHandler, activate_small_static, 49 "startchat_small", true ); 48 50 49 51 … … 58 60 assert( this->inpbuf != NULL ); 59 61 60 /* MARK add generation of ChatBox thingy here*/62 /* generate chatbox ui and chatbox-inputonly ui */ 61 63 GUIManager::getInstance().loadGUI( "ChatBox" ); 64 GUIManager::getInstance().loadGUI( "ChatBox-inputonly" ); 62 65 63 66 /* configure the input buffer */ … … 66 69 this->inputState = InputManager::getInstance().createInputState( "chatinput", false, false, InputStatePriority::Dynamic ); 67 70 this->inputState->setKeyHandler(this->inpbuf); 68 69 //[> set console shortcut <]70 //this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(71 //&ChatInputHandler::activate, this), "startchat"), false);72 71 } 73 72 … … 99 98 /* get window pointers */ 100 99 input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" ); 100 inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" ); 101 101 102 CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" ); 102 103 lb_history = dynamic_cast<CEGUI::Listbox*>(history); … … 109 110 /* activate, deactivate */ 110 111 void ChatInputHandler::activate_static() 111 { ChatInputHandler::getInstance().activate(); } 112 113 void ChatInputHandler::activate() 112 { ChatInputHandler::getInstance().activate( true ); } 113 114 void ChatInputHandler::activate_small_static() 115 { ChatInputHandler::getInstance().activate( false ); } 116 117 void ChatInputHandler::activate( bool full ) 114 118 { 115 119 /* start listening */ … … 118 122 119 123 /* MARK add spawning of chat widget stuff here.*/ 120 GUIManager::getInstance().showGUI( "ChatBox" ); 124 if( full ) 125 GUIManager::getInstance().showGUI( "ChatBox" ); 126 else 127 GUIManager::getInstance().showGUI( "ChatBox-inputonly" ); 121 128 } 122 129 … … 128 135 /* MARK add un-spawning of chat widget stuff here. */ 129 136 GUIManager::getInstance().hideGUI( "ChatBox" ); 137 GUIManager::getInstance().hideGUI( "ChatBox-inputonly" ); 130 138 } 131 139 … … 146 154 /* set the text */ 147 155 this->input->setProperty( "Text", left + "|" + right ); 156 this->inputonly->setProperty( "Text", left + "|" + right ); 148 157 } 149 158 -
code/branches/chat2/src/orxonox/ChatInputHandler.h
r6846 r6870 73 73 74 74 /* cegui stuff */ 75 CEGUI::Window *input ;75 CEGUI::Window *input, *inputonly; 76 76 CEGUI::Listbox *lb_history; 77 77 … … 83 83 /* start listening, stop listening */ 84 84 static void activate_static(); 85 void activate(); 85 static void activate_small_static(); 86 void activate( bool full ); 86 87 void deactivate(); 87 88
Note: See TracChangeset
for help on using the changeset viewer.