GWEN improvement: allow to navigate TreeControl and ComboBox using the cursor keys

This commit is contained in:
erwin coumans
2013-07-01 23:43:49 -07:00
parent 898f423f95
commit 0f78c696b5
14 changed files with 458 additions and 17 deletions

View File

@@ -125,8 +125,14 @@ void Gwen::Input::OnCanvasThink( Controls::Base* pControl )
if ( Gwen::MouseFocus && !Gwen::MouseFocus->Visible() )
Gwen::MouseFocus = NULL;
if ( Gwen::KeyboardFocus && ( !Gwen::KeyboardFocus->Visible() || !KeyboardFocus->GetKeyboardInputEnabled() ) )
Gwen::KeyboardFocus = NULL;
if (Gwen::KeyboardFocus )
{
bool isVisible = Gwen::KeyboardFocus->Visible();
bool isEnabled = KeyboardFocus->GetKeyboardInputEnabled();
if ( !isVisible || !isEnabled )
Gwen::KeyboardFocus = NULL;
}
if ( !KeyboardFocus ) return;
if ( KeyboardFocus->GetCanvas() != pControl ) return;