summaryrefslogtreecommitdiff
path: root/scene/gui/split_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/split_container.cpp')
-rw-r--r--scene/gui/split_container.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 49a7957d7c..d7ee7a6b86 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -345,6 +345,7 @@ void SplitContainer::_input_event(const InputEvent& p_event) {
expand_ofs=drag_ofs+((vertical?mm.y:mm.x)-drag_from);
queue_sort();
+ emit_signal("dragged",get_split_offset());
}
}
@@ -431,11 +432,13 @@ void SplitContainer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_dragger_visible","visible"),&SplitContainer::set_dragger_visible);
ObjectTypeDB::bind_method(_MD("is_dragger_visible"),&SplitContainer::is_dragger_visible);
+ ADD_SIGNAL( MethodInfo("dragged",PropertyInfo(Variant::INT,"offset")));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/offset"),_SCS("set_split_offset"),_SCS("get_split_offset"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/collapsed"),_SCS("set_collapsed"),_SCS("is_collapsed"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/dragger_visible"),_SCS("set_dragger_visible"),_SCS("is_dragger_visible"));
+
}
SplitContainer::SplitContainer(bool p_vertical) {