diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-05-17 18:27:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-05-17 18:28:44 -0300 |
commit | c195c0df6b36debc870216dd42e49fbda70fa861 (patch) | |
tree | 194a26e39ace86d7a471f3e86159c2aed6be261c /scene/2d/light_2d.cpp | |
parent | 3a26e14a2bab777c9ba6aedceff6e4ef2666faf0 (diff) | |
download | redot-engine-c195c0df6b36debc870216dd42e49fbda70fa861.tar.gz |
-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree
-Added a vformat() function to ease translation work
Diffstat (limited to 'scene/2d/light_2d.cpp')
-rw-r--r-- | scene/2d/light_2d.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 9715afeaa4..b79c07360b 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -61,6 +61,8 @@ void Light2D::set_texture( const Ref<Texture>& p_texture) { VS::get_singleton()->canvas_light_set_texture(canvas_light,texture->get_rid()); else VS::get_singleton()->canvas_light_set_texture(canvas_light,RID()); + + update_configuration_warning(); } Ref<Texture> Light2D::get_texture() const { @@ -282,6 +284,16 @@ void Light2D::_notification(int p_what) { } +String Light2D::get_configuration_warning() const { + + if (!texture.is_valid()) { + return TTR("A texture with the shape of the light must be supplied to the 'texture' property."); + } + + return String(); +} + + void Light2D::_bind_methods() { |