chore: modified the GDGAMEONLY calls in player_input.cpp to be on the signature line
parent
47a5965e31
commit
e0f6ba276b
|
@ -71,24 +71,21 @@ gd::Vector2 PlayerInput::get_last_mouse_motion() {
|
|||
return PlayerInput::lastMouseMotion;
|
||||
}
|
||||
|
||||
void PlayerInput::_enter_tree() {
|
||||
GDGAMEONLY();
|
||||
void PlayerInput::_enter_tree() { GDGAMEONLY();
|
||||
if(!PlayerInput::primaryExists) {
|
||||
this->isPrimary = true;
|
||||
PlayerInput::primaryExists = true;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerInput::_exit_tree() {
|
||||
GDGAMEONLY();
|
||||
void PlayerInput::_exit_tree() { GDGAMEONLY();
|
||||
if(this->isPrimary) {
|
||||
this->isPrimary = false;
|
||||
PlayerInput::primaryExists = false;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerInput::_unhandled_input(gd::Ref<gd::InputEvent> const &event) {
|
||||
GDGAMEONLY();
|
||||
void PlayerInput::_unhandled_input(gd::Ref<gd::InputEvent> const &event) { GDGAMEONLY();
|
||||
if(this->isPrimary && event->is_class("InputEventMouseMotion"))
|
||||
PlayerInput::lastMouseMotion = gd::Object::cast_to<gd::InputEventMouseMotion>(*event)->get_relative();
|
||||
for(Listener& listener: this->listeners) {
|
||||
|
|
Loading…
Reference in New Issue