Jump to content

Console::setActive(true) doesn't work as expected


photo

Recommended Posts

Posted (edited)

Hello,

Tried this code to circumvent current limitation with keyboard handling in console management, but as explained in the code comments, it doesn't work as expected.

// Doesn't work. The console can be hidden, but never shown
if (App::clearKeyState(App::KEY_F1)) {
	Console::setActive(!Console::isActive());
}
// Doesn't work. The console cannot be opened with this.
// If the console is already open, then it will quick-close-open it again. (???)
if (App::clearKeyState(App::KEY_F2)) {
	Console::setActive(true);
}
// Works OK. Closes the console
if (App::clearKeyState(App::KEY_F3)) {
	Console::setActive(false);
}
// isActive Works ok, but strangely clearKeyState doesn't as it clearly auto-repeat keys
// based on OS setup. Shouldn't the key NOT auto-repeat? Or is there another fct for this behavior? 
if (App::clearKeyState(App::KEY_F4)) {
	Log::message("active=%d\n",Console::isActive());
}

Also, Console::run("show"); doesn't work either.

Can you advise?

Edited by Amerio.Stephane
Posted

Just showing/hiding the console through code

  • 2 months later...
Posted

Hello,

Is there any workaround to fix it in the version 2.13?

Posted

Hi Artem,

I'm afraid there is no workaround available for this behavior since the bugged logic is deeply inside the engine sources (and there is no other methods with similar behavior that can be used instead).

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...