11 cm( inst, this,
"InputSourceNode" ),
14 refresh_queued( false )
33 this->_input_children.push_back( node );
44 for(
size_t i = 0; i < this->_input_children.size(); i++ )
45 if( this->_input_children[ i ] == node )
47 this->_input_children[ i ]->input_setParent(
nullptr );
48 this->_input_children.erase( this->_input_children.begin() + i );
55 for(
auto it = this->_input_children.rbegin(); it != this->_input_children.rend(); ++it )
64 this->reserved.insert( key );
66 this->reserved_whole.insert( key.first );
71 this->reserved.erase( key );
73 this->reserved_whole.erase( key.first );
77 void SourceInputNode::on_binding_changed()
79 this->refresh_queued =
true;
84 this->refresh_queued =
true;
87 void SourceInputNode::frame_update()
89 if( this->refresh_queued )
91 this->refresh_queued =
false;
99 this->reserved.erase( device_key );
113 if( this->pressed.count( device_key ) )
116 this->pressed.insert( device_key );
120 if( !this->pressed.count( device_key ) )
123 this->pressed.erase( device_key );
129 bool offspace =
false;
131 bool cont = this->
input_visit(
this, device_key, press, real, offspace );
133 return !cont || !real;
139 return this->reserved.count( device_key ) || this->reserved_whole.count( device_key.first );
142 void SourceInputNode::do_refresh()
148 bool offspace = this->is_reserved( device_key );
150 this->
input_visit(
this, device_key, press, real, offspace );
160 bool offspace = this->is_reserved( device_key );
162 node->
input_visit(
nullptr, device_key, press, real, offspace );