#include <ExManagerConsole.h>
Graphe d'héritage de la classe ExManagerConsole

|
|
Définition à la ligne 114 du fichier ExManagerConsole.h. Référencé par AddStringAction(), et LoadStringActionFile(). |
|
|
|
Définition à la ligne 97 du fichier ExManagerConsole.cpp. Références ExManagerConsole(), Guard, et UnGuard.
00098 {
00099 Guard(ExManagerConsole::~ExManagerConsole(void))
00100 UnGuard
00101 }
|
|
|
Définition à la ligne 719 du fichier ExManagerConsole.cpp. Références AddStringAction(), Guard, StringAction, et UnGuard.
00720 {
00721 Guard(void ExManagerConsole::AddStringAction(StringAction StrAction))
00722 AddStringAction(StrAction.first.data(),StrAction.second);
00723 UnGuard
00724 }
|
|
||||||||||||
|
Définition à la ligne 708 du fichier ExManagerConsole.cpp. Références AddStringAction(), ExManager::Consol, Guard, m_VecStringAction, StringAction, et UnGuard. Référencé par AddStringAction(), et LoadStringActionFile().
00709 {
00710 Guard(void ExManagerConsole::AddStringAction(std::string String,int Action))
00711 StringAction ac;
00712 ac.first=String;
00713 ac.second=Action;
00714 m_VecStringAction.push_back(ac);
00715 *Consol<<"Add new command to console command:"<<String<<" Action:"<<Action<<std::endl;
00716 UnGuard
00717 }
|
|
|
Définition à la ligne 584 du fichier ExManagerConsole.cpp. Références ApplyBuffCommand(), ClearConsol(), ExManager::Consol, Guard, ListConsoleCommand(), LOAD_FILE, ExCAction::m_Action, m_BuffCommand, m_BufferConsol, m_BuffOldCommand, m_ItVecStringAction, ExCAction::m_StartingLife, m_VecStringAction, NOTHING, PREDIFINEDCOMMAND, QUIT, RESET, ExCAction::SetParam(), et UnGuard. Référencé par ApplyBuffCommand(), et InputCommand().
00585 {
00586 Guard(ExCAction ExManagerConsole::ApplyBuffCommand(void))
00587 bool findaction=false;
00588 ExCAction Action;
00589 Action.m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00590 *Consol<<m_BuffCommand.data()<<std::endl;
00591 for(m_ItVecStringAction=m_VecStringAction.begin();m_ItVecStringAction!=m_VecStringAction.end();m_ItVecStringAction++)
00592 {
00593 if(m_BuffCommand.find(m_ItVecStringAction->first.data())==0)
00594 {
00595 findaction=true;
00596 char buffer[255];
00597 memset(buffer,0,255);
00598 Action.m_Action=m_ItVecStringAction->second;
00599 m_BuffCommand.copy(buffer,(m_BuffCommand.size())-(strlen(m_ItVecStringAction->first.data())),strlen(m_ItVecStringAction->first.data()));
00600 Action.SetParam(buffer);
00601 m_BuffOldCommand.push_back(m_BuffCommand);
00602 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00603 }
00604 }
00605 if(!findaction)
00606 {
00607 if(strcmp(m_BuffCommand.data(),"clear")==0)
00608 {
00609 m_BuffOldCommand.push_back(m_BuffCommand);
00610 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00611 m_BufferConsol.clear();
00612 ClearConsol();
00613 Action.m_Action= NOTHING;
00614 return Action;
00615 }
00616
00617 if(m_BuffCommand.find("help")==0)
00618 {
00619 ListConsoleCommand();
00620 m_BuffOldCommand.push_back(m_BuffCommand);
00621 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00622 Action.m_Action= NOTHING;
00623 return Action;
00624 }
00625 if(m_BuffCommand.find("Extension")==0)
00626 {
00627 *Consol<<"Extension :"<<glGetString(GL_EXTENSIONS)<<std::endl;
00628 m_BuffOldCommand.push_back(m_BuffCommand);
00629 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00630 Action.m_Action= NOTHING;
00631 return Action;
00632 }
00633 if(m_BuffCommand.find("cmd ")==0)
00634 {
00635 int cmd=0;
00636 char *SBuffer;
00637 SBuffer=new char[strlen(m_BuffCommand.data())-5] ;
00638 memset(SBuffer,0,strlen(m_BuffCommand.data()));
00639 m_BuffCommand.copy(SBuffer,m_BuffCommand.size()-4,4);
00640 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00641 try
00642 {
00643 cmd=atoi(SBuffer);
00644 Action.m_Action= m_VecStringAction.at(cmd-PREDIFINEDCOMMAND).second;
00645 }catch(...)
00646 {
00647 *Consol<<"Bad argument use list to show command list"<<std::endl;
00648 Action.m_Action= NOTHING;
00649 return Action;
00650 }
00651 }
00652
00653 if(m_BuffCommand.find("run ")==0)
00654 {
00655 // stay ton fin space between each param and put it into action
00656 if (m_BuffCommand.size()<5)
00657 {
00658 *Consol<<"run command need one argument"<<std::endl;
00659 }
00660 try
00661 {
00662 char *SBuffer;
00663 SBuffer=new char[strlen(m_BuffCommand.data())-4] ;
00664 m_BuffCommand.copy(SBuffer,m_BuffCommand.size()-4,m_BuffCommand.find("run ")+4);
00665 Action.m_Action= atoi(SBuffer);
00666 }catch(...){Action.m_Action= NOTHING;}
00667 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00668 return Action;
00669 }
00670
00671 if(strcmp(m_BuffCommand.data(),"quit")==0)
00672 {
00673 m_BuffOldCommand.push_back(m_BuffCommand);
00674 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00675 Action.m_Action= QUIT;
00676 return Action;
00677 }
00678
00679 if(strcmp(m_BuffCommand.data(),"reset")==0)
00680 {
00681 m_BuffOldCommand.push_back(m_BuffCommand);
00682 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00683 Action.m_Action= RESET;
00684 return Action;
00685 }
00686
00687 if(m_BuffCommand.find("load")!=(unsigned)-1)
00688 {
00689 char buffer[255];
00690 memset(buffer,0,255);
00691 Action.m_Action=LOAD_FILE;
00692 m_BuffCommand.copy(buffer,m_BuffCommand.size()-4,4);
00693 Action.SetParam(buffer);
00694 m_BuffOldCommand.push_back(m_BuffCommand);
00695 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00696 return Action;
00697 }
00698
00699 *Consol<<"Unknow command"<<std::endl;
00700 m_BuffOldCommand.push_back(m_BuffCommand);
00701 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00702 Action.m_Action= NOTHING;
00703 }
00704 return Action;
00705 UnGuard
00706 }
|
|
|
Définition à la ligne 89 du fichier ExManager.h. Références ExManager::m_AskForCommand. Référencé par ExManagerCommand::InputCommand().
00089 {return m_AskForCommand;}
|
|
|
Définition à la ligne 90 du fichier ExManager.h. Références ExManager::m_Exclusif. Référencé par ExManagerCommand::InputCommand().
00090 {return m_Exclusif;}
|
|
|
Définition à la ligne 762 du fichier ExManagerConsole.cpp. Références ClearConsol(), Guard, m_BuffCommand, m_BufferConsol, m_BuffOldCommand, et UnGuard. Référencé par ApplyBuffCommand(), ClearConsol(), et ExManagerCommand::ProcesExCAction().
00763 {
00764 Guard(void ExManagerConsole::ClearConsol(void))
00765 m_BuffOldCommand.push_back(m_BuffCommand);
00766 m_BuffCommand.erase(m_BuffCommand.begin(),m_BuffCommand.end());
00767 m_BufferConsol.clear();
00768 UnGuard
00769 }
|
|
|
Définition à la ligne 374 du fichier ExManagerConsole.cpp. Références console_move. Référencé par InputAction().
00374 {
00375 console_move = p;
00376 }
|
|
|
Définition à la ligne 29 du fichier ExManagerConsole.cpp. Références CreateSingleton(), Guard, m_flag, m_instance, et UnGuard. Référencé par CreateManager(), et CreateSingleton().
00029 {
00030 Guard(ExManagerConsole* ExManagerConsole::CreateSingleton(void))
00031 if(!m_flag)
00032 {
00033 m_flag = true; // We are creating the error log now, so set flag to true
00034 m_instance = new ExManagerConsole; // Create the error log
00035 }else
00036 {
00037 std::cout<<"Error singleton already created"<<std::endl;
00038 }
00039 return m_instance;
00040 UnGuard
00041 }
|
|
|
Définition à la ligne 121 du fichier ExManagerConsole.cpp. Références console_move, Draw(), ExNihilo::EnterOrthoMode(), FULL, FULLTOHALF, FULLTOHIDE, ExManagerWindow::GetResolutionX(), ExManagerWindow::GetResolutionY(), ExManager::GetStatus(), Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, ExNihilo::LeaveOrthoMode(), LineDown(), LineUp(), m_BackGroundTexture, m_BackGroundTextureState, m_Blending, m_BuffCommand, m_BufferConsol, m_ConsoleState, m_ConsoleTrans, m_ConsoleTransPalier, m_fBackGroundBlue, m_fBackGroundGreen, m_fBackGroundRed, m_fBlending, m_LineToStar, m_Move, m_NextConsoleState, m_RItBufferConsol, ManagerTexture, ManagerWindow, ExNihilo::RenderBitmapString(), ExManagerTexture::ResetMultitexture(), ExManagerTexture::SetCurrentObject(), ExManager::SetStatus(), ExManagerTexture::SetTexture(), TabTextures, TabVertices, UnGuard, UpdateConsolBuffer(), et VERSION. Référencé par Draw(), et ExManagerOutput::DrawScene().
00122 {
00123 Guard(void ExManagerConsole::Draw(void))
00124 if(!GetStatus())return;
00125 int i=0;
00126 float textcoordy=0;
00127 float cordy=0;
00128 char buffer[80];
00129 sprintf(buffer,"version %s ",VERSION);
00130
00131
00132
00133 switch(m_ConsoleState)
00134 {
00135 case HIDE:
00136 SetStatus(false);
00137 break;
00138
00139 case HALF:
00140 textcoordy=0.5f;
00141 cordy=ManagerWindow->GetResolutionY()/2;
00142 break;
00143
00144 case FULL:
00145 textcoordy=1.0f;
00146 cordy=ManagerWindow->GetResolutionY();
00147 break;
00148
00149 case HIDETOHALF:
00150 //cout<<"Draw hide to half "<<endl;
00151 textcoordy=(1.0f/m_ConsoleTransPalier)*m_ConsoleTrans;
00152 cordy=(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans;
00153 m_ConsoleTrans++;
00154 if(cordy>((ManagerWindow->GetResolutionY()/2)-(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)))
00155 {
00156 m_ConsoleState=m_NextConsoleState;
00157 }
00158 break;
00159
00160 case HIDETOFULL:
00161 //cout<<"Draw hide to full "<<endl;
00162 textcoordy=((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00163 cordy=(ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans;
00164 m_ConsoleTrans++;
00165 if(cordy>(ManagerWindow->GetResolutionY()))
00166 {
00167 m_ConsoleState=m_NextConsoleState;
00168 }
00169 break;
00170
00171 case HALFTOFULL:
00172 //cout<<"Draw half to full"<<endl;
00173 textcoordy=((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans)+0.5f;
00174 cordy=((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans)+ManagerWindow->GetResolutionY()/2;
00175 m_ConsoleTrans++;
00176 if(cordy>(ManagerWindow->GetResolutionY()))
00177 {
00178 m_ConsoleState=m_NextConsoleState;
00179 }
00180 break;
00181
00182 case FULLTOHIDE:
00183 //cout<<"Draw full to hide"<<endl;
00184 textcoordy=1.0f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00185 cordy=ManagerWindow->GetResolutionY()-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00186 m_ConsoleTrans++;
00187 if(cordy<0)
00188 {
00189 m_ConsoleState=m_NextConsoleState;
00190 }
00191 break;
00192
00193 case FULLTOHALF:
00194 //cout<<"Draw full to half"<<endl;
00195 textcoordy=1.0f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00196 cordy=(ManagerWindow->GetResolutionY())-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00197 m_ConsoleTrans++;
00198 if(cordy<ManagerWindow->GetResolutionY()/2)
00199 {
00200 m_ConsoleState=m_NextConsoleState;
00201 }
00202 break;
00203
00204 case HALFTOHIDE:
00205 //cout<<"Draw half to hide"<<endl;
00206 textcoordy=0.5f-((1.0f/m_ConsoleTransPalier)*m_ConsoleTrans);
00207 cordy=(ManagerWindow->GetResolutionY()/2)-((ManagerWindow->GetResolutionY()/m_ConsoleTransPalier)*m_ConsoleTrans);
00208 m_ConsoleTrans++;
00209 if(cordy<0)
00210 {
00211 m_ConsoleState=m_NextConsoleState;
00212 }
00213 break;
00214 }
00215 //-------------------
00216 //Draw back console
00217 //-------------------
00218 if(m_Move>0)LineUp();
00219 if(m_Move<0)LineDown();
00220
00221 ExNihilo::EnterOrthoMode();
00222 glPushAttrib(GL_ALL_ATTRIB_BITS);
00223 if(m_BackGroundTextureState)glEnable(GL_TEXTURE_2D);
00224 glDisable(GL_LIGHTING);
00225 glDisable(GL_DEPTH_TEST);
00226 ManagerTexture->SetCurrentObject(m_BackGroundTexture);
00227 if(m_Blending)
00228 {
00229 glColor4f(m_fBackGroundRed,m_fBackGroundGreen,m_fBackGroundBlue,m_fBlending);
00230 glEnable(GL_BLEND);
00231 glEnable(GL_ALPHA);
00232 glBlendFunc(GL_ONE,GL_ONE);
00233 glEnable(GL_ALPHA_TEST);
00234 glAlphaFunc(GL_GREATER,0);
00235 glDisable(GL_LIGHTING);
00236 }else
00237 {
00238 glColor4f(1,1,1,1);
00239 }
00240
00241 TabTextures[1]=textcoordy;
00242 TabTextures[7]=textcoordy;
00243
00244
00245 TabVertices[3]=cordy;
00246 TabVertices[4]=ManagerWindow->GetResolutionX();
00247 TabVertices[5]=cordy;
00248 TabVertices[6]=ManagerWindow->GetResolutionX();
00249
00250 glMatrixMode(GL_TEXTURE);
00251 glTranslatef(0.0f,-0.0001*glutGet(GLUT_ELAPSED_TIME),0.0f);
00252 glMatrixMode(GL_MODELVIEW);
00253 ManagerTexture->SetTexture(0,"back3");
00254 glTexCoordPointer(2,GL_FLOAT,0,TabTextures);
00255 ManagerTexture->SetTexture(1,m_BackGroundTexture);
00256 glTexCoordPointer(2,GL_FLOAT,0,TabTextures);
00257
00258 glEnableClientState(GL_VERTEX_ARRAY);
00259 glVertexPointer(2,GL_FLOAT,0,TabVertices);
00260 glDrawArrays( GL_QUADS, 0, 4 );
00261 ManagerTexture->ResetMultitexture();
00262 glMatrixMode(GL_TEXTURE);
00263 glLoadIdentity();
00264 glMatrixMode(GL_MODELVIEW);
00265 glPopAttrib();
00266
00267 //-------------------
00268 //Draw credits
00269 //-------------------
00270 glColor4f(0,0,1,1);
00271
00272 ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-40,GLUT_BITMAP_8_BY_13,"ExNihilo Engine ");
00273 ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-30,GLUT_BITMAP_8_BY_13,buffer);
00274 ExNihilo::RenderBitmapString(ManagerWindow->GetResolutionX()-160,cordy-20,GLUT_BITMAP_8_BY_13,"Plok Software");
00275 //-------------------
00276 //Draw buffer console
00277 //-------------------
00278 glColor3f(0.5,0,0);
00279
00280 UpdateConsolBuffer();
00281
00282
00283 for(i=0,m_RItBufferConsol=m_BufferConsol.rbegin();i<m_LineToStar;i++)
00284 {
00285 m_RItBufferConsol++;
00286 }
00287
00288 for(i=0;m_RItBufferConsol!=m_BufferConsol.rend();m_RItBufferConsol++,i++)
00289 {
00290 ExNihilo::RenderBitmapString(10,cordy-(10*i)-20,GLUT_BITMAP_8_BY_13,m_RItBufferConsol->data());
00291 if(i*10>cordy)break;
00292 }
00293
00294 m_BufferConsol.clear();
00295
00296 //--------------------
00297 //Draw Current Command
00298 //--------------------
00299 ExNihilo::RenderBitmapString(10,cordy-10,GLUT_BITMAP_8_BY_13,"]"+m_BuffCommand);
00300
00301 glEnable(GL_DEPTH_TEST);
00302 glEnable(GL_LIGHTING);
00303 glDisable(GL_TEXTURE_2D);
00304
00305 ExNihilo::LeaveOrthoMode();
00306
00307 if (m_ConsoleState == m_NextConsoleState && console_move == true) {
00308 console_move = false;
00309 }
00310
00311 //DrawBuffer();
00312 UnGuard
00313 }
|
|
|
Définition à la ligne 155 du fichier ExManagerConsole.h. Références m_ConsoleState.
00155 { return m_ConsoleState; }
|
|
|
Définition à la ligne 85 du fichier ExManager.h. Références ExManager::m_Status. Référencé par ExManagerInterface::Draw(), Draw(), et ExManagerOutput::DrawScene().
00085 {return m_Status;}
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 103 du fichier ExManagerConsole.cpp. Références Guard, SetConsoleBackGroudTexture(), et UnGuard. Référencé par PostInitManager(), et PreInitManager().
00104 {
00105 Guard(void ExManagerConsole::init(void))
00106 SetConsoleBackGroudTexture("back");
00107 UnGuard
00108 }
|
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 452 du fichier ExManagerConsole.cpp. Références ExNihilo::AddKeyToBuffer(), ApplyBuffCommand(), CONSOL_NEXT_AVIABLE_STATE, Guard, HIDE_CONSOL, InputAction(), InputCommand(), KEYBOARD_DOWN_ENTER, KEYBOARD_DOWN_ESC, KEYBOARD_DOWN_EXP, KEYBOARD_DOWN_PAGE_DOWN, KEYBOARD_DOWN_PAGE_UP, KEYBOARD_DOWN_SPACE, KEYBOARD_DOWN_TAB, KEYBOARD_UP_ARROW_DOWN, KEYBOARD_UP_ARROW_LEFT, KEYBOARD_UP_ARROW_UP, KEYBOARD_UP_BACKSPACE, KEYBOARD_UP_PAGE_DOWN, KEYBOARD_UP_PAGE_UP, m_BuffCommand, m_BuffOldCommand, ExCCommand::m_Command, m_ItVecStringAction, m_Move, m_VecStringAction, NOTHING, PosIntoBuffOldCommand, et UnGuard. Référencé par InputCommand(), et ExManagerCommand::InputCommand().
00453 {
00454 Guard(ExCAction ExManagerConsole::InputCommand(ExCCommand Command))
00455 //std::cout<<"ManagerConsol::Input Command consol:"<<Command.m_Command<<std::endl;
00456 switch(Command.m_Command)
00457 {
00458 case KEYBOARD_DOWN_EXP:
00459 InputAction(CONSOL_NEXT_AVIABLE_STATE);
00460 return NOTHING;
00461
00462 case KEYBOARD_DOWN_ESC:
00463 InputAction(HIDE_CONSOL);
00464 return NOTHING;
00465
00466 case KEYBOARD_DOWN_PAGE_UP:
00467 m_Move=-1;
00468 return NOTHING;
00469
00470 case KEYBOARD_DOWN_PAGE_DOWN:
00471 m_Move=1;
00472 return NOTHING;
00473
00474 case KEYBOARD_UP_PAGE_UP:
00475 m_Move=0;
00476 return NOTHING;
00477
00478 case KEYBOARD_UP_PAGE_DOWN:
00479 m_Move=0;
00480 return NOTHING;
00481
00482 case KEYBOARD_DOWN_SPACE:
00483 m_BuffCommand.append(" ");
00484 return NOTHING;
00485
00486 case KEYBOARD_DOWN_ENTER:
00487 return ApplyBuffCommand();
00488
00489 case KEYBOARD_DOWN_TAB: {
00490 std::vector<std::string> vec_tmp;
00491 std::vector<std::string>::iterator i_tmp;
00492
00493 vec_tmp.push_back ("load");
00494 vec_tmp.push_back ("cmd");
00495 vec_tmp.push_back ("help");
00496 vec_tmp.push_back ("clear");
00497 vec_tmp.push_back ("quit");
00498
00499 for (m_ItVecStringAction = m_VecStringAction.begin(); m_ItVecStringAction != m_VecStringAction.end(); m_ItVecStringAction++) {
00500 vec_tmp.push_back (m_ItVecStringAction->first);
00501 }
00502
00503 i_tmp = vec_tmp.begin ();
00504 std::string tmp;
00505
00506 while (i_tmp != vec_tmp.end ()) {
00507 tmp = *i_tmp++;
00508
00509 if (tmp.find (m_BuffCommand) == 0) {
00510 if (tmp.find (' ') < tmp.length ())
00511 m_BuffCommand = tmp.substr (0, tmp.find (' '));
00512 else m_BuffCommand = tmp;
00513 //m_BuffCommand += ' '; // this add a space after command
00514 // but it sucks with some commands like quit :/
00515 }
00516 }
00517 return NOTHING;
00518 }
00519
00520 case KEYBOARD_UP_ARROW_DOWN:
00521 PosIntoBuffOldCommand++;
00522 if(PosIntoBuffOldCommand<(int)m_BuffOldCommand.size()&&PosIntoBuffOldCommand>=-1)
00523 {
00524 m_BuffCommand=m_BuffOldCommand.at(PosIntoBuffOldCommand);
00525 }else
00526 {
00527 PosIntoBuffOldCommand=0;
00528 }
00529
00530
00531 return NOTHING;
00532
00533 case KEYBOARD_UP_ARROW_UP:
00534 PosIntoBuffOldCommand--;
00535 if(PosIntoBuffOldCommand<(int)m_BuffOldCommand.size()&&PosIntoBuffOldCommand>=0)
00536 {
00537 m_BuffCommand=m_BuffOldCommand.at(PosIntoBuffOldCommand);
00538 }else
00539 {
00540 PosIntoBuffOldCommand=0;
00541 }
00542 return NOTHING;
00543
00544 case KEYBOARD_UP_ARROW_LEFT:
00545 if(m_BuffCommand.size()>0)
00546 {
00547 m_BuffCommand.erase(m_BuffCommand.end()-1,m_BuffCommand.end());
00548 }
00549 return NOTHING;
00550
00551 case KEYBOARD_UP_BACKSPACE:
00552 if(m_BuffCommand.size()>0)
00553 {
00554 m_BuffCommand.erase(m_BuffCommand.end()-1,m_BuffCommand.end());
00555 }
00556 return NOTHING;
00557 }
00558 ExNihilo::AddKeyToBuffer(Command.m_Command,m_BuffCommand);
00559 return NOTHING;
00560 UnGuard
00561 }
|
|
|
Définition à la ligne 157 du fichier ExManagerConsole.h. Références console_move. Référencé par InputAction().
00157 { return console_move; }
|
|
|
Définition à la ligne 368 du fichier ExManagerConsole.cpp. Références m_LineToStar. Référencé par Draw(), et InputAction().
00369 {
00370 m_LineToStar--;
00371 if(m_LineToStar<0){m_LineToStar=0;}
00372 }
|
|
|
Définition à la ligne 363 du fichier ExManagerConsole.cpp. Références m_LineInConsol, et m_LineToStar. Référencé par Draw(), et InputAction().
00364 {
00365 m_LineToStar++;
00366 if(m_LineToStar>m_LineInConsol)m_LineToStar=m_LineInConsol;
00367 }
|
|
|
Définition à la ligne 563 du fichier ExManagerConsole.cpp. Références ExManager::Consol, Guard, ListConsoleCommand(), m_ItVecStringAction, m_VecStringAction, PREDIFINEDCOMMAND, et UnGuard. Référencé par ApplyBuffCommand(), et ListConsoleCommand().
00564 {
00565 Guard(void ExManagerConsole::ListConsoleCommand(void))
00566 *Consol<<"*******************************"<<std::endl;
00567 *Consol<<"*List of all available command*"<<std::endl;
00568 *Consol<<"*******************************"<<std::endl;
00569 *Consol<<"load 'FILENAME'"<<std::endl;
00570 *Consol<<"cmd 'number of command'"<<std::endl;;
00571 *Consol<<"help 'command'"<<std::endl;
00572 *Consol<<"clear 'clear console screen'"<<std::endl;
00573 *Consol<<"Extension ' List aviable Extension'"<<std::endl;
00574 *Consol<<"quit 'exit ExNihilo'"<<std::endl;
00575 int i=PREDIFINEDCOMMAND;
00576 for(m_ItVecStringAction=m_VecStringAction.begin(); m_ItVecStringAction != m_VecStringAction.end(); m_ItVecStringAction++, i++)
00577 {
00578 *Consol<<m_ItVecStringAction->first.data()<<std::endl;
00579 }
00580 *Consol<<"*****************************"<<std::endl;
00581 UnGuard
00582 }
|
|
|
Définition à la ligne 726 du fichier ExManagerConsole.cpp. Références AddStringAction(), ExNihilo::ExtracValueFromSring(), Guard, LoadStringActionFile(), PREFIX, StringAction, et UnGuard. Référencé par ExManagerLoad::InputAction(), ExManagerLoad::LoadSetOfFile(), et LoadStringActionFile().
00727 {
00728 Guard(void ExManagerConsole::LoadStringActionFile(const char *FileName))
00729 char buffer[255];
00730
00731 #ifdef UNIX_SRC
00732 sprintf(buffer, PREFIX "/ExNihilo/Data/Console/%s", FileName);
00733 #else
00734 sprintf(buffer, "../Data/Console/%s", FileName);
00735 #endif
00736 StringAction BuffStringAction;
00737 std::ifstream fin;
00738 std::string buffstring;
00739 char b[256];
00740 fin.open(buffer,std::ios::in);
00741 if(fin.is_open())
00742 {
00743 try
00744 {
00745 do
00746 {
00747 memset(b,0,255);
00748 fin.getline(b,256,'\n');
00749 try
00750 {
00751 buffstring=ExNihilo::ExtracValueFromSring(b,"<consolcommand>","<#consolcommand>");
00752 AddStringAction(ExNihilo::ExtracValueFromSring(buffstring,"<string>","<#string>")
00753 ,ExNihilo::ExtractIntValueFromSring(buffstring,"<action>","<#action>"));
00754 }catch(ExCExpStringNotFound){}
00755 }while(!fin.eof());
00756 fin.close();
00757 }catch(...){throw ExCExpFileReadError();}
00758 }else throw ExCExpFileNotFound();
00759 UnGuard
00760 }
|
|
|
Définition à la ligne 426 du fichier ExManagerConsole.cpp. Références FULL, FULLTOHALF, FULLTOHIDE, Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, m_ConsoleState, NextAviableState(), et UnGuard. Référencé par InputAction(), et NextAviableState().
00426 {
00427 Guard(int ExManagerConsole::NextAviableState(void))
00428 switch(m_ConsoleState) {
00429 case HIDE: return HALF;
00430 case HALF: return FULL;
00431 case FULL: return HIDE;
00432 case HIDETOHALF : return HALF;
00433 case HIDETOFULL : return FULL;
00434 case HALFTOFULL : return FULL;
00435 case FULLTOHALF : return HALF;
00436 case FULLTOHIDE : return HIDE;
00437 case HALFTOHIDE : return HIDE;
00438 default: return HALF;
00439 }
00440 UnGuard
00441 }
|
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 83 du fichier ExManagerConsole.cpp. Références console_move, Guard, HIDE, m_ConsoleState, m_ConsoleTransPalier, m_LineCounter, m_VecStringAction, PosIntoBuffOldCommand, Reset(), et UnGuard. Référencé par ExManagerCommand::ProcesExCAction(), et Reset().
00084 {
00085 Guard(ExManagerConsole::Reset(void))
00086 m_ConsoleState=HIDE;
00087 m_LineCounter=2;
00088 PosIntoBuffOldCommand=0;
00089 m_ConsoleTransPalier=20;
00090 //m_BufferConsol.clear();
00091 m_VecStringAction.clear();
00092 // SetConsoleBackGroudTexture("back2.tga");
00093 console_move = false;
00094 UnGuard
00095 }
|
|
|
Définition à la ligne 87 du fichier ExManager.h. Références ExManager::m_AskForCommand. Référencé par ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), InputAction(), ExManagerNetwork::InputCommand(), ExManagerLoad::LoadSetOfFile(), et ExManagerNetwork::Say().
00087 {m_AskForCommand=status;}
|
|
|
Définition à la ligne 88 du fichier ExManager.h. Références ExManager::m_Exclusif. Référencé par ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), InputAction(), ExManagerNetwork::InputCommand(), et ExManagerNetwork::Say().
00088 {m_Exclusif=status;}
|
|
|
Définition à la ligne 161 du fichier ExManagerConsole.h. Références m_fBlending. Référencé par InputAction().
00161 {m_fBlending=blending;}
|
|
|
Définition à la ligne 160 du fichier ExManagerConsole.h. Références m_Blending. Référencé par InputAction().
00160 {m_Blending=state;}
|
|
||||||||||||||||
|
Définition à la ligne 165 du fichier ExManagerConsole.h. Références B, m_fBackGroundBlue, m_fBackGroundGreen, et m_fBackGroundRed.
00165 {m_fBackGroundBlue=B;m_fBackGroundGreen=G;m_fBackGroundRed=R;}
|
|
|
Définition à la ligne 164 du fichier ExManagerConsole.h. Références m_fBackGroundBlue. Référencé par InputAction().
00164 {m_fBackGroundBlue=value;}
|
|
|
Définition à la ligne 163 du fichier ExManagerConsole.h. Références m_fBackGroundGreen. Référencé par InputAction().
00163 {m_fBackGroundGreen=value;}
|
|
|
Définition à la ligne 162 du fichier ExManagerConsole.h. Références m_fBackGroundRed. Référencé par InputAction().
00162 {m_fBackGroundRed=value;}
|
|
|
Définition à la ligne 111 du fichier ExManagerConsole.cpp. Références ExManagerTexture::Add(), Guard, m_BackGroundTexture, ManagerTexture, SetConsoleBackGroudTexture(), et UnGuard. Référencé par Init(), InputAction(), et SetConsoleBackGroudTexture().
00112 {
00113 Guard(void ExManagerConsole::SetConsoleBackGroudTexture(std::string FileName))
00114 if(ManagerTexture->Add(FileName))
00115 {
00116 m_BackGroundTexture=FileName;
00117 }
00118
00119 UnGuard
00120 }
|
|
|
Définition à la ligne 159 du fichier ExManagerConsole.h. Références m_BackGroundTextureState. Référencé par InputAction().
00159 {m_BackGroundTextureState=state;}
|
|
|
Définition à la ligne 378 du fichier ExManagerConsole.cpp. Références FULL, FULLTOHALF, FULLTOHIDE, Guard, HALF, HALFTOFULL, HALFTOHIDE, HIDE, HIDETOFULL, HIDETOHALF, m_ConsoleState, m_ConsoleTrans, m_NextConsoleState, SetConsoleState(), ExManager::SetStatus(), et UnGuard. Référencé par InputAction(), et SetConsoleState().
00379 {
00380 Guard(void ExManagerConsole::SetConsoleState(int state))
00381 //cout<<"set console state :"<<state<<endl;
00382 SetStatus(true);
00383 switch(m_ConsoleState)
00384 {
00385 case HIDE:
00386 m_NextConsoleState=state;
00387 switch(state)
00388 {
00389 case HALF:
00390 m_ConsoleState=HIDETOHALF;
00391 break;
00392 case FULL:
00393 m_ConsoleState=HIDETOFULL;
00394 break;
00395 }
00396 break;
00397 case HALF:
00398 m_NextConsoleState=state;
00399 switch(state)
00400 {
00401 case FULL:
00402 m_ConsoleState=HALFTOFULL;
00403 break;
00404 case HIDE:
00405 m_ConsoleState=HALFTOHIDE;
00406 break;
00407 }
00408 break;
00409 case FULL:
00410 m_NextConsoleState=state;
00411 switch(state)
00412 {
00413 case HALF:
00414 m_ConsoleState=FULLTOHALF;
00415 break;
00416 case HIDE:
00417 m_ConsoleState=FULLTOHIDE;
00418 break;
00419 }
00420 break;
00421 }
00422 m_ConsoleTrans=1;
00423 UnGuard
00424 }
|
|
||||||||||||
|
Définition à la ligne 35 du fichier ExManager.cpp. Références ExManager::Consol, et ExManager::FluxAction. Référencé par SetManagerLink().
00036 {
00037 Consol=consol;
00038 FluxAction=action;
00039 }
|
|
|
Définition à la ligne 145 du fichier ExManagerConsole.h. Références ManagerTexture. Référencé par SetManagerLink().
00145 {ManagerTexture = Texture;}
|
|
|
Définition à la ligne 144 du fichier ExManagerConsole.h. Références ManagerWindow. Référencé par SetManagerLink().
00144 {ManagerWindow = Window;}
|
|
|
Définition à la ligne 86 du fichier ExManager.h. Références ExManager::m_Status. Référencé par Draw(), ExManagerConsole(), ExManagerObjectWindow::Init(), ExManagerInterface::Init(), InputAction(), ExManagerLoad::LoadSetOfFile(), et SetConsoleState().
00086 {m_Status=status;}
|
|
|
Définition à la ligne 314 du fichier ExManagerConsole.cpp. Références ExManager::Consol, ExManagerWindow::GetResolutionX(), Guard, LogConsol, logfilecsl, m_BufferConsol, m_ItBufferConsol, m_LineInConsol, ManagerWindow, UnGuard, et UpdateConsolBuffer(). Référencé par Draw(), et UpdateConsolBuffer().
00315 {
00316 Guard(void ExManagerConsole::UpdateConsolBuffer(void))
00317 std::string bufferstring,bufferstring2;
00318 bufferstring=Consol->rdbuf( )->str();
00319 Consol->freeze(false);
00320 Consol->clear();
00321 Consol->flush();
00322 //m_BufferConsol.push_back(bufferstring);
00323
00324
00325 m_LineInConsol=0;
00326 do
00327 {
00328 bufferstring2 = bufferstring.substr(0,bufferstring.find ( "\n" ,0));
00329 bufferstring.erase(0,bufferstring.find ( "\n" ,0)+1);
00330 do
00331 {
00332 if(bufferstring2.size()>(unsigned)(ManagerWindow->GetResolutionX()/8)-1)
00333 {
00334 m_BufferConsol.push_back(bufferstring2.substr(0,((int)(ManagerWindow->GetResolutionX()/8))-1));
00335 bufferstring2=bufferstring2.substr(((int)(ManagerWindow->GetResolutionX()/8))-1,bufferstring2.size());
00336 m_LineInConsol++;
00337 }else
00338 {
00339 m_BufferConsol.push_back(bufferstring2);
00340 m_LineInConsol++;
00341 break;
00342 }
00343 }while(1);
00344 }while((unsigned)-1 != bufferstring.find( "\n" ,0));
00345
00346 //-------------------
00347 //Save Consol Flux
00348 //-------------------
00349
00350 if(LogConsol=true)
00351 {
00352 logfilecsl.open("logConsol.txt",std::ios::out);
00353 int i=0;
00354 for(m_ItBufferConsol=m_BufferConsol.begin();m_ItBufferConsol!=m_BufferConsol.end();m_ItBufferConsol++,i++)
00355 {
00356 logfilecsl<<i<<"::"<<m_ItBufferConsol->data()<<std::endl;
00357 }
00358 //logfilecsl.close();
00359 }
00360 UnGuard
00361 }
|
|
|
Définition à la ligne 443 du fichier ExManagerConsole.cpp. Références ExManager::Consol, Guard, UnGuard, et Write(). Référencé par Write().
00444 {
00445 Guard(void ExManagerConsole::Write(const char *Label))
00446 //*Consol<<"<<==================Write to consol===========================>>"<<std::endl;
00447 *Consol << Label << std::endl;
00448 //*Consol<<"<<============================================================>>"<<std::endl;
00449 UnGuard
00450 }
|
|
|
|
|
|
|
Définition à la ligne 96 du fichier ExManagerConsole.h. Référencé par ConsoleMove(), Draw(), ExManagerConsole(), isConsoleMove(), et Reset(). |
|
|
Définition à la ligne 74 du fichier ExManager.h. Référencé par ExManagerWindow::Apply(), ExManagerCommand::ApplyAction(), ExManagerCommand::LoadExecFile(), ExManagerId::RecordObject(), ExManager::SetFlux(), et ExManagerSpecialEffect::Specialeffect(). |
|
|
Définition à la ligne 98 du fichier ExManagerConsole.h. Référencé par ExManagerConsole(), et UpdateConsolBuffer(). |
|
|
Définition à la ligne 107 du fichier ExManagerConsole.h. Référencé par ExManagerConsole(), et UpdateConsolBuffer(). |
|
|
Définition à la ligne 70 du fichier ExManager.h. Référencé par ExManager::AskForCommand(), ExManagerConsole(), et ExManager::SetAskForCommand(). |
|
|
Définition à la ligne 110 du fichier ExManagerConsole.h. Référencé par Draw(), et SetConsoleBackGroudTexture(). |
|
|
Définition à la ligne 99 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudTextureState(). |
|
|
Définition à la ligne 100 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudBlendingState(). |
|
|
Définition à la ligne 111 du fichier ExManagerConsole.h. Référencé par ApplyBuffCommand(), ClearConsol(), Draw(), et InputCommand(). |
|
|
Définition à la ligne 118 du fichier ExManagerConsole.h. Référencé par ApplyBuffCommand(), ClearConsol(), Draw(), et UpdateConsolBuffer(). |
|
|
Définition à la ligne 112 du fichier ExManagerConsole.h. Référencé par ApplyBuffCommand(), ClearConsol(), et InputCommand(). |
|
|
Définition à la ligne 91 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), GetConsoleState(), NextAviableState(), Reset(), et SetConsoleState(). |
|
|
Définition à la ligne 93 du fichier ExManagerConsole.h. Référencé par Draw(), et SetConsoleState(). |
|
|
Définition à la ligne 95 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), et Reset(). |
|
|
Définition à la ligne 71 du fichier ExManager.h. Référencé par ExManager::AskForExclusifCommand(), et ExManager::SetAskForExclusifCommand(). |
|
|
Définition à la ligne 102 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorBlue(). |
|
|
Définition à la ligne 104 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorGreen(). |
|
|
Définition à la ligne 103 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), SetConsoleBackGroudColor(), et SetConsoleBackGroudColorRed(). |
|
|
Définition à la ligne 101 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), et SetConsoleBackGroudBlending(). |
|
|
Définition à la ligne 26 du fichier ExManagerConsole.cpp. Référencé par CreateSingleton(). |
|
|
Définition à la ligne 27 du fichier ExManagerConsole.cpp. Référencé par CreateSingleton(). |
|
|
Définition à la ligne 120 du fichier ExManagerConsole.h. Référencé par UpdateConsolBuffer(). |
|
|
Définition à la ligne 116 du fichier ExManagerConsole.h. Référencé par ApplyBuffCommand(), InputCommand(), et ListConsoleCommand(). |
|
|
Définition à la ligne 92 du fichier ExManagerConsole.h. Référencé par ExManagerConsole(), et Reset(). |
|
|
Définition à la ligne 106 du fichier ExManagerConsole.h. Référencé par LineUp(), et UpdateConsolBuffer(). |
|
|
Définition à la ligne 105 du fichier ExManagerConsole.h. Référencé par Draw(), LineDown(), et LineUp(). |
|
|
Définition à la ligne 97 du fichier ExManagerConsole.h. Référencé par Draw(), ExManagerConsole(), et InputCommand(). |
|
|
Définition à la ligne 94 du fichier ExManagerConsole.h. Référencé par Draw(), et SetConsoleState(). |
|
|
Définition à la ligne 119 du fichier ExManagerConsole.h. Référencé par Draw(). |
|
|
Définition à la ligne 69 du fichier ExManager.h. Référencé par ExManager::GetStatus(), et ExManager::SetStatus(). |
|
|
Définition à la ligne 115 du fichier ExManagerConsole.h. Référencé par AddStringAction(), ApplyBuffCommand(), InputCommand(), ListConsoleCommand(), et Reset(). |
|
|
Définition à la ligne 90 du fichier ExManagerConsole.h. Référencé par Draw(), SetConsoleBackGroudTexture(), et SetManagerTexture(). |
|
|
Définition à la ligne 89 du fichier ExManagerConsole.h. Référencé par Draw(), SetManagerWindow(), et UpdateConsolBuffer(). |
|
|
Définition à la ligne 108 du fichier ExManagerConsole.h. Référencé par ExManagerConsole(), InputCommand(), et Reset(). |
|
|
Définition à la ligne 122 du fichier ExManagerConsole.h. Référencé par Draw(), et ExManagerConsole(). |
|
|
Définition à la ligne 122 du fichier ExManagerConsole.h. Référencé par Draw(), et ExManagerConsole(). |
1.3.4