Letschki
03-01-2009 15:36:54
Hello,
i am using QuickGUI 8.12 with Ogre 1.6 and got a problem when registering a console input handler via setConsoleInputHandler(). I am not sure if my usage of the console widget is correct:
One problem is that i cannot compile this code unless i change the QuickGUI file "QuickGUIConsole.h".
Unchanged version:
Changed version (first parameter: changed the void to bool in the method signature):
The changed version of the code compiles and executes. But now the console acts unexpected if i enter a Text and hit return. The text is moved to the text area as expected, but the textbox is filled (24 times) with the last character that i have entered. If i remove the call to setConsoleInputHandler() the console widget works as expected.
Thanks in advance
i am using QuickGUI 8.12 with Ogre 1.6 and got a problem when registering a console input handler via setConsoleInputHandler(). I am not sure if my usage of the console widget is correct:
...
m_conMain->setConsoleInputHandler<myClass>(&myClass::onConsoleInput, this);
...
bool myClass::onConsoleInput(QuickGUI::Console* console, bool& clearInputBox, bool& addToDisplayArea) {
...
clearInputBox = true;
addToDisplayArea = true;
return true;
}
One problem is that i cannot compile this code unless i change the QuickGUI file "QuickGUIConsole.h".
Unchanged version:
template<typename T> void setConsoleInputHandler(void (T::*ConsoleInputHandler)(Console* console, bool& clearInputBox, bool& addToDisplayArea), T* obj)
Changed version (first parameter: changed the void to bool in the method signature):
template<typename T> void setConsoleInputHandler(bool(T::*ConsoleInputHandler)(Console* console, bool& clearInputBox, bool& addToDisplayArea), T* obj)
The changed version of the code compiles and executes. But now the console acts unexpected if i enter a Text and hit return. The text is moved to the text area as expected, but the textbox is filled (24 times) with the last character that i have entered. If i remove the call to setConsoleInputHandler() the console widget works as expected.
Thanks in advance