[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input key_button.cxx,NONE,1.1 key_but
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input key_button.cxx,NONE,1.1 key_button.hxx,NONE,1.1 Makefile.am,1.1,1.2 |
Date: |
4 Jul 2002 11:32:20 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv27737
Modified Files:
Makefile.am
Added Files:
key_button.cxx key_button.hxx
Log Message:
concrete Button which may me mapped to a keyboard key
--- NEW FILE: key_button.cxx ---
// $Id: key_button.cxx,v 1.1 2002/07/04 11:32:18 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <ClanLib/Display/Input/keyboard.h>
#include "key_button.hxx"
namespace Input {
KeyButton::KeyButton(int button_) : button(button_) { }
void
KeyButton::update(float)
{
}
bool
KeyButton::is_pressed()
{
return CL_Keyboard::get_keycode(button);
}
}
/* EOF */
--- NEW FILE: key_button.hxx ---
// $Id: key_button.hxx,v 1.1 2002/07/04 11:32:18 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_PINGUS_INPUT_KEY_BUTTON_HXX
#define HEADER_PINGUS_INPUT_KEY_BUTTON_HXX
#include "button.hxx"
namespace Input {
class KeyButton : Button {
private:
int button;
public:
KeyButton(int button_);
virtual bool is_pressed ();
virtual void update (float);
};
}
#endif
/* EOF */
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Makefile.am 3 Jul 2002 16:53:57 -0000 1.1
+++ Makefile.am 4 Jul 2002 11:32:18 -0000 1.2
@@ -18,8 +18,8 @@
noinst_LIBRARIES = libpingus_input.a
libpingus_input_a_SOURCES = \
- button.hxx button.cxx \
- axis.hxx axis.cxx \
- pointer.hxx pointer.cxx
-
+ axis.hxx \
+ button.hxx \
+ key_button.hxx key_button.cxx \
+ pointer.hxx
# EOF #
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input key_button.cxx,NONE,1.1 key_button.hxx,NONE,1.1 Makefile.am,1.1,1.2,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input pointer.cxx,1.1,NONE axis.cxx,1.1,NONE
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_button.cxx,NONE,1.1 mouse_button.hxx,NONE,1.1
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input pointer.cxx,1.1,NONE axis.cxx,1.1,NONE
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_button.cxx,NONE,1.1 mouse_button.hxx,NONE,1.1
- Index(es):