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;
The fundamental type of node for the data graph.
An optional parameter associated with an event.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_data(int index, const EventParameter &data)
Sets the data for the indicated parameter.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Encapsulates the data generated from (or sent into) any particular DataNode.
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...