From b8742051196a3fc74f74fb79bb900eec3c56f96f Mon Sep 17 00:00:00 2001 From: Dana Olson Date: Mon, 8 Dec 2014 23:26:19 -0500 Subject: closes #163 --- core/color.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/color.cpp b/core/color.cpp index 1528db6aaa..3116c33a31 100644 --- a/core/color.cpp +++ b/core/color.cpp @@ -225,7 +225,7 @@ Color Color::inverted() const { Color Color::contrasted() const { Color c=*this; - c.contrasted(); + c.contrast(); return c; } -- cgit v1.2.3 From 792d675d819119f209fb656bd366d010837a8762 Mon Sep 17 00:00:00 2001 From: Dana Olson Date: Mon, 8 Dec 2014 23:53:55 -0500 Subject: wrong typedef - closes #270 --- core/int_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/int_types.h b/core/int_types.h index 15ef68e915..31f05b2d35 100644 --- a/core/int_types.h +++ b/core/int_types.h @@ -48,7 +48,7 @@ typedef signed short int16_t; typedef unsigned int uint32_t; typedef signed int int32_t; typedef long long int64_t; -typedef unsigned long long int64_t; +typedef unsigned long long uint64_t; #else #include #endif -- cgit v1.2.3 From e168d43b4a6964bf5b9808bc3f19bf1ab99a8535 Mon Sep 17 00:00:00 2001 From: Dana Olson Date: Wed, 10 Dec 2014 16:50:43 -0500 Subject: added GDScript binding for set_window_title --- core/bind/core_bind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index ef943b2f7a..0dd467986e 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -642,7 +642,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint); - + ObjectTypeDB::bind_method(_MD("set_window_title","title"),&_OS::set_window_title); ObjectTypeDB::bind_method(_MD("set_low_processor_usage_mode","enable"),&_OS::set_low_processor_usage_mode); ObjectTypeDB::bind_method(_MD("is_in_low_processor_usage_mode"),&_OS::is_in_low_processor_usage_mode); -- cgit v1.2.3 From 7c7ab30c4ef74f3e7a90ab6d23d69d545fac7cf3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 13 Jan 2015 11:22:56 -0300 Subject: fixes --- core/object_type_db.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp index f7917b7418..1047d7eba5 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -847,8 +847,15 @@ void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) { bool ObjectTypeDB::is_type_enabled(StringName p_type) { - ERR_FAIL_COND_V(!types.has(p_type),false); - return !types[p_type].disabled; + TypeInfo *ti=types.getptr(p_type); + if (!ti || !ti->creation_func) { + if (compat_types.has(p_type)) { + ti=types.getptr(compat_types[p_type]); + } + } + + ERR_FAIL_COND_V(!ti,false); + return !ti->disabled; } StringName ObjectTypeDB::get_category(const StringName& p_node) { -- cgit v1.2.3 From 317c496f5c1aa25af4144ea04cef4ba6fe420830 Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Tue, 20 Jan 2015 20:01:02 +0800 Subject: Add InputEvent::ACTION get/set support for variant Add action_press/action_release method bind --- core/os/input.cpp | 2 ++ core/variant_op.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'core') diff --git a/core/os/input.cpp b/core/os/input.cpp index a827e75896..5d4b3a834d 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -62,6 +62,8 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode); ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode); ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos); + ObjectTypeDB::bind_method(_MD("action_press"),&Input::action_press); + ObjectTypeDB::bind_method(_MD("action_release"),&Input::action_release); BIND_CONSTANT( MOUSE_MODE_VISIBLE ); BIND_CONSTANT( MOUSE_MODE_HIDDEN ); diff --git a/core/variant_op.cpp b/core/variant_op.cpp index ec43b1275c..fbb5e2631d 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1687,6 +1687,19 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid) return; } } + if (ie.type == InputEvent::ACTION) { + + if (str =="action") { + valid=true; + ie.action.action=p_value; + return; + } + else if (str == "pressed") { + valid=true; + ie.action.pressed=p_value; + return; + } + } } break; case DICTIONARY: { @@ -2365,6 +2378,17 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const { return Vector2(ie.screen_drag.speed_x,ie.screen_drag.speed_y); } } + if (ie.type == InputEvent::ACTION) { + + if (str =="action") { + valid=true; + return ie.action.action; + } + else if (str == "pressed") { + valid=true; + ie.action.pressed; + } + } } break; case DICTIONARY: { -- cgit v1.2.3