2 * Manager for keyboard events
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
32 #include "BoolValue.h"
33 #include "SCA_KeyboardManager.h"
34 #include "SCA_KeyboardSensor.h"
38 SCA_KeyboardManager::SCA_KeyboardManager(SCA_LogicManager* logicmgr,
39 SCA_IInputDevice* inputdev)
40 : SCA_EventManager(logicmgr, KEYBOARD_EVENTMGR),
41 m_inputDevice(inputdev)
47 SCA_KeyboardManager::~SCA_KeyboardManager()
53 SCA_IInputDevice* SCA_KeyboardManager::GetInputDevice()
60 void SCA_KeyboardManager::NextFrame()
62 //const SCA_InputEvent& event = GetEventValue(SCA_IInputDevice::KX_EnumInputs inputcode)=0;
63 // cerr << "SCA_KeyboardManager::NextFrame"<< endl;
64 SG_DList::iterator<SCA_ISensor> it(m_sensors);
65 for (it.begin();!it.end();++it)
67 (*it)->Activate(m_logicmgr);
71 bool SCA_KeyboardManager::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
74 //return m_kxsystem->IsPressed(inputcode);