I'm using CEGUI with SDL in c++ on linux and and I have little problem
when i try to test key.scancode with CEGUI::key.
I try to make a tab navigation on 3 editbox.
this is my code
Code: Select all
bool Reseau::actionDeplacerTab(const CEGUI::EventArgs& event){
WindowManager& winMgr = WindowManager::getSingleton();
const WindowEventArgs press = static_cast<const WindowEventArgs&>(event);
const KeyEventArgs& key = static_cast<const KeyEventArgs&>(event);
//test des attribut de key
cout<<"- test de la touche tab"<<endl;
cout<<"key scancode ="<<key.scancode<<endl;
cout<<"key sysKeys ="<<key.sysKeys<<endl;
cout<<"key codepoint ="<<key.codepoint<<endl;
cout<<"key tab ="<< Key::Tab <<endl;
if(key.scancode == Key::Tab ){
cout<<"tab test ok"<<endl;
if(press.window == winMgr.getWindow("reseau/serveur/editboxIp")){
winMgr.getWindow( "reseau/serveur/editboxPort")->activate();
}else if(press.window == winMgr.getWindow( "reseau/serveur/editboxPort")){
winMgr.getWindow( "reseau/serveur/editboxNom")->activate();
}else{
winMgr.getWindow( "reseau/serveur/editboxIp")->activate();
}
}
return true;
}
and this is the output in my prompt when I try tab in the editbox
Code: Select all
- test de la touche tab
key scancode =136745464
key sysKeys =135644992
key codepoint =3084976040
key tab =15
I don't know where is my error because all keys are written well on edibox.
Thank you in advance if somebody could help me.