[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_button.cxx,NONE,1.1 mouse
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_button.cxx,NONE,1.1 mouse_button.hxx,NONE,1.1 |
Date: |
4 Jul 2002 11:54:59 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv28188
Added Files:
mouse_button.cxx mouse_button.hxx
Log Message:
concrete button class mapping the first mouse
--- NEW FILE: mouse_button.cxx ---
// $Id: mouse_button.cxx,v 1.1 2002/07/04 11:54:57 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/input.h>
#include <ClanLib/Display/Input/inputdevice.h>
#include <ClanLib/Display/Input/inputbutton.h>
#include "mouse_button.hxx"
namespace Input {
MouseButton::MouseButton(int button_) : button(button_) { }
void
MouseButton::update(float)
{
}
bool
MouseButton::is_pressed()
{
return CL_Input::pointers[0]->get_button(button)->is_pressed();
}
}
/* EOF */
--- NEW FILE: mouse_button.hxx ---
// $Id: mouse_button.hxx,v 1.1 2002/07/04 11:54:57 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_MOUSE_BUTTON_HXX
#define HEADER_PINGUS_INPUT_MOUSE_BUTTON_HXX
#include "button.hxx"
namespace Input {
class MouseButton : Button {
private:
int button;
public:
MouseButton(int button_);
virtual bool is_pressed ();
virtual void update (float);
};
}
#endif
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input mouse_button.cxx,NONE,1.1 mouse_button.hxx,NONE,1.1,
torangan <=
- Prev by Date:
[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
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input joystick_button.cxx,NONE,1.1 joystick_button.hxx,NONE,1.1
- Previous by 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
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input joystick_button.cxx,NONE,1.1 joystick_button.hxx,NONE,1.1
- Index(es):