Skip to content

Commit

Permalink
Expose _clips_input as a virtual function, closes #15358
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Jul 29, 2018
1 parent 0fcc28b commit c752c26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ void Control::_notification(int p_notification) {

bool Control::clips_input() const {

if (get_script_instance()) {
return get_script_instance()->call(SceneStringNames::get_singleton()->_clips_input);
}
return false;
}
bool Control::has_point(const Point2 &p_point) const {
Expand Down Expand Up @@ -2828,6 +2831,7 @@ void Control::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
BIND_VMETHOD(MethodInfo("drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_make_custom_tooltip", PropertyInfo(Variant::STRING, "for_text")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_clips_input"));

ADD_GROUP("Anchor", "anchor_");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "_set_anchor", "get_anchor", MARGIN_LEFT);
Expand Down
2 changes: 2 additions & 0 deletions scene/scene_string_names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ SceneStringNames::SceneStringNames() {
_update_scroll = StaticCString::create("_update_scroll");
_update_xform = StaticCString::create("_update_xform");

_clips_input = StaticCString::create("_clips_input");

_proxgroup_add = StaticCString::create("_proxgroup_add");
_proxgroup_remove = StaticCString::create("_proxgroup_remove");

Expand Down
2 changes: 2 additions & 0 deletions scene/scene_string_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ class SceneStringNames {
StringName _update_scroll;
StringName _update_xform;

StringName _clips_input;

StringName _proxgroup_add;
StringName _proxgroup_remove;

Expand Down

0 comments on commit c752c26

Please sign in to comment.