Merge pull request #588 from marynate/PR-fix-touchscreenbutton-input
Fixed touchscreen was processing input in editor
This commit is contained in:
commit
f304c9f93a
1 changed files with 6 additions and 2 deletions
|
@ -92,7 +92,10 @@ void TouchScreenButton::_notification(int p_what) {
|
||||||
if (!get_scene()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY)
|
if (!get_scene()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility==VISIBILITY_TOUCHSCREEN_ONLY)
|
||||||
return;
|
return;
|
||||||
update();
|
update();
|
||||||
set_process_input(true);
|
|
||||||
|
if (!get_scene()->is_editor_hint())
|
||||||
|
set_process_input(true);
|
||||||
|
|
||||||
if (action.operator String()!="" && InputMap::get_singleton()->has_action(action)) {
|
if (action.operator String()!="" && InputMap::get_singleton()->has_action(action)) {
|
||||||
action_id=InputMap::get_singleton()->get_action_id(action);
|
action_id=InputMap::get_singleton()->get_action_id(action);
|
||||||
} else {
|
} else {
|
||||||
|
@ -170,7 +173,8 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
if (texture.is_valid())
|
||||||
|
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue