Improve to_string() and add it to Resource

This commit is contained in:
kobewi
2024-07-07 20:18:35 +02:00
parent 9a5d6d1049
commit e6783dbdd1
13 changed files with 53 additions and 61 deletions

View File

@@ -459,8 +459,8 @@ Variant Tween::interpolate_variant(const Variant &p_initial_val, const Variant &
return ret;
}
String Tween::to_string() {
String ret = Object::to_string();
String Tween::_to_string() {
String ret = Object::_to_string();
Node *node = get_bound_node();
if (node) {
ret += vformat(" (bound to %s)", node->get_name());

View File

@@ -140,10 +140,9 @@ private:
protected:
static void _bind_methods();
virtual String _to_string() override;
public:
virtual String to_string() override;
Ref<PropertyTweener> tween_property(const Object *p_target, const NodePath &p_property, Variant p_to, double p_duration);
Ref<IntervalTweener> tween_interval(double p_time);
Ref<CallbackTweener> tween_callback(const Callable &p_callback);