diff engine/core/gui/console/console.cpp @ 157:bb9902910067

input_rework merged! Bad features: * Broken DND for zero-projekt. * Design short-comings.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 14 Oct 2008 07:41:48 +0000
parents 90005975cdbb
children 756b895e1dab
line wrap: on
line diff
--- a/engine/core/gui/console/console.cpp	Sun Oct 12 20:30:09 2008 +0000
+++ b/engine/core/gui/console/console.cpp	Tue Oct 14 07:41:48 2008 +0000
@@ -78,6 +78,8 @@
 		m_animationTimer.setCallback( boost::bind(&Console::updateAnimation, this) );
 
 		m_toolsbutton->addActionListener(this);
+		m_toolsbutton->setFocusable(false);
+		m_input->addFocusListener(this);
 
 		GuiFont* font = GUIManager::instance()->createFont();
 		font->setColor(255,255,255);
@@ -299,5 +301,9 @@
 		m_input->setFont(font);
 		m_output->setFont(font);
 	}
+
+	void Console::focusLost(const gcn::Event& ) {
+		hide();
+	}
 }
 /* vim: set noexpandtab: set shiftwidth=2: set tabstop=2: */