diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-11-12 11:23:23 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-11-12 11:23:23 -0300 |
commit | 6dd8768811cfca5bb831619d93cf870e5d20667f (patch) | |
tree | 9e8837b7c8334855a1bce1bd79ab441edde28129 /scene/gui | |
parent | c8cd5222a7fa931f072e02b23c5b9d826d0ef548 (diff) |
3D Import Import & UDP
-=-=-=-=-=-=-=-=-=-=-
-Animation Import filter support
-Animation Clip import support
-Animation Optimizer Fixes, Improvements and Visibile Options
-Extremely Experimental UDP support.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/base_button.cpp | 35 | ||||
-rw-r--r-- | scene/gui/video_player.cpp | 4 | ||||
-rw-r--r-- | scene/gui/video_player.h | 2 |
3 files changed, 21 insertions, 20 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 442fd286dd..cf3bef73ea 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -55,9 +55,9 @@ void BaseButton::_input_event(InputEvent p_event) { if (b.pressed) { if (!toggle_mode) { //mouse press attempt - - status.press_attempt=true; - status.pressing_inside=true; + + status.press_attempt=true; + status.pressing_inside=true; pressed(); emit_signal("pressed"); @@ -74,13 +74,13 @@ void BaseButton::_input_event(InputEvent p_event) { } - } else { - - if (status.press_attempt &&status.pressing_inside) { - pressed(); - emit_signal("pressed"); - } - status.press_attempt=false; + } else { + + if (status.press_attempt && status.pressing_inside) { +// released(); + emit_signal("released"); + } + status.press_attempt=false; } update(); break; @@ -95,14 +95,14 @@ void BaseButton::_input_event(InputEvent p_event) { if (status.press_attempt &&status.pressing_inside) { - + if (!toggle_mode) { //mouse press attempt - + pressed(); - emit_signal("pressed"); + emit_signal("pressed"); } else { - + status.pressed=!status.pressed; pressed(); @@ -110,11 +110,11 @@ void BaseButton::_input_event(InputEvent p_event) { toggled(status.pressed); emit_signal("toggled",status.pressed); - + } - + } - + status.press_attempt=false; } @@ -363,6 +363,7 @@ void BaseButton::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode); ADD_SIGNAL( MethodInfo("pressed" ) ); + ADD_SIGNAL( MethodInfo("released" ) ); ADD_SIGNAL( MethodInfo("toggled", PropertyInfo( Variant::BOOL,"pressed") ) ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "disabled"), _SCS("set_disabled"), _SCS("is_disabled")); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "toggle_mode"), _SCS("set_toggle_mode"), _SCS("is_toggle_mode")); diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 857ea25d0f..050fd890f4 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -192,7 +192,7 @@ String VideoPlayer::get_stream_name() const { return stream->get_name(); }; -float VideoPlayer::get_pos() const { +float VideoPlayer::get_stream_pos() const { if (stream.is_null()) return 0; @@ -231,7 +231,7 @@ void VideoPlayer::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_stream_name"),&VideoPlayer::get_stream_name); - ObjectTypeDB::bind_method(_MD("get_pos"),&VideoPlayer::get_pos); + ObjectTypeDB::bind_method(_MD("get_stream_pos"),&VideoPlayer::get_stream_pos); ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&VideoPlayer::set_autoplay); ObjectTypeDB::bind_method(_MD("has_autoplay"),&VideoPlayer::has_autoplay); diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h index db5f9a58a6..3eb629ced5 100644 --- a/scene/gui/video_player.h +++ b/scene/gui/video_player.h @@ -77,7 +77,7 @@ public: float get_volume_db() const; String get_stream_name() const; - float get_pos() const; + float get_stream_pos() const; void set_autoplay(bool p_vol); bool has_autoplay() const; |