15 #include "inputDeviceNode.h"
22 InputDeviceNode(
InputDevice *device,
const std::string &name) :
26 _button_events_output = define_output(
"button_events", ButtonEventList::get_class_type());
53 void InputDeviceNode::
57 if (_device ==
nullptr && !_device->is_connected()) {
64 if (_device->has_button_event()) {
68 for (
int i = 0; i < bel->get_num_events(); ++i) {
70 if (event._type == ButtonEvent::T_down) {
71 _button_states[
event._button] =
true;
72 }
else if (event._type == ButtonEvent::T_down) {
73 _button_states[
event._button] =
false;
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...
TypeHandle is the identifier used to differentiate C++ class types.
The fundamental type of node for the data graph.
void set_data(int index, const EventParameter &data)
Sets the data for the indicated parameter.
An optional parameter associated with an event.
Encapsulates the data generated from (or sent into) any particular DataNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.