-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
This commit is contained in:
parent
3a26e14a2b
commit
c195c0df6b
63 changed files with 531 additions and 146 deletions
|
|
@ -237,6 +237,19 @@ void PathFollow2D::_get_property_list( List<PropertyInfo> *p_list) const{
|
|||
}
|
||||
|
||||
|
||||
String PathFollow2D::get_configuration_warning() const {
|
||||
|
||||
if (!is_visible() || !is_inside_tree())
|
||||
return String();
|
||||
|
||||
if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
|
||||
return TTR("PathFolow2D only works when set as a child of a Path2D node.");
|
||||
}
|
||||
|
||||
return String();
|
||||
|
||||
}
|
||||
|
||||
void PathFollow2D::_bind_methods() {
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("set_offset","offset"),&PathFollow2D::set_offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue