From b3616089fad2d113626c22f14034ae52b3eecb68 Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Tue, 8 Nov 2016 17:40:46 -0300 Subject: adding get_stored_values method changed order name (cherry picked from commit dbca4ee3fe283f59a8c9d50aae73b97f48be7b01) --- scene/main/instance_placeholder.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'scene/main/instance_placeholder.cpp') diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp index fb047ea5e4..15045a73d5 100644 --- a/scene/main/instance_placeholder.cpp +++ b/scene/main/instance_placeholder.cpp @@ -101,11 +101,28 @@ void InstancePlaceholder::replace_by_instance(const Ref &p_custom_s base->remove_child(this); base->add_child(scene); base->move_child(scene,pos); - } +Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) { + + Dictionary ret; + StringArray order; + + for(List::Element *E=stored_values.front();E;E=E->next()) { + ret[E->get().name] = E->get().value; + if (p_with_order) + order.push_back(E->get().name); + }; + + if (p_with_order) + ret[".order"] = order; + + return ret; +}; + void InstancePlaceholder::_bind_methods() { + ObjectTypeDB::bind_method(_MD("get_stored_values","with_order"),&InstancePlaceholder::get_stored_values,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("replace_by_instance","custom_scene:PackedScene"),&InstancePlaceholder::replace_by_instance,DEFVAL(Variant())); ObjectTypeDB::bind_method(_MD("get_instance_path"),&InstancePlaceholder::get_instance_path); } -- cgit v1.2.3 From c7bc44d5ad9aae4902280012f7654e2318cd910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Jan 2017 22:01:57 +0100 Subject: Welcome in 2017, dear changelog reader! That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games! --- scene/main/instance_placeholder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/main/instance_placeholder.cpp') diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp index 15045a73d5..ebba96ff81 100644 --- a/scene/main/instance_placeholder.cpp +++ b/scene/main/instance_placeholder.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 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 */ -- cgit v1.2.3