You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Change set/get binding to use StringName
This commit is contained in:
@@ -1196,7 +1196,7 @@ Array Object::_get_signal_list() const {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array Object::_get_signal_connection_list(const String &p_signal) const {
|
Array Object::_get_signal_connection_list(const StringName &p_signal) const {
|
||||||
List<Connection> conns;
|
List<Connection> conns;
|
||||||
get_all_signal_connections(&conns);
|
get_all_signal_connections(&conns);
|
||||||
|
|
||||||
@@ -1422,11 +1422,11 @@ void Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::_set_bind(const String &p_set, const Variant &p_value) {
|
void Object::_set_bind(const StringName &p_set, const Variant &p_value) {
|
||||||
set(p_set, p_value);
|
set(p_set, p_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant Object::_get_bind(const String &p_name) const {
|
Variant Object::_get_bind(const StringName &p_name) const {
|
||||||
return get(p_name);
|
return get(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -523,10 +523,10 @@ private:
|
|||||||
bool _has_user_signal(const StringName &p_name) const;
|
bool _has_user_signal(const StringName &p_name) const;
|
||||||
Error _emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
|
Error _emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
|
||||||
Array _get_signal_list() const;
|
Array _get_signal_list() const;
|
||||||
Array _get_signal_connection_list(const String &p_signal) const;
|
Array _get_signal_connection_list(const StringName &p_signal) const;
|
||||||
Array _get_incoming_connections() const;
|
Array _get_incoming_connections() const;
|
||||||
void _set_bind(const String &p_set, const Variant &p_value);
|
void _set_bind(const StringName &p_set, const Variant &p_value);
|
||||||
Variant _get_bind(const String &p_name) const;
|
Variant _get_bind(const StringName &p_name) const;
|
||||||
void _set_indexed_bind(const NodePath &p_name, const Variant &p_value);
|
void _set_indexed_bind(const NodePath &p_name, const Variant &p_value);
|
||||||
Variant _get_indexed_bind(const NodePath &p_name) const;
|
Variant _get_indexed_bind(const NodePath &p_name) const;
|
||||||
|
|
||||||
|
|||||||
@@ -325,7 +325,7 @@
|
|||||||
</method>
|
</method>
|
||||||
<method name="get" qualifiers="const">
|
<method name="get" qualifiers="const">
|
||||||
<return type="Variant" />
|
<return type="Variant" />
|
||||||
<argument index="0" name="property" type="String" />
|
<argument index="0" name="property" type="StringName" />
|
||||||
<description>
|
<description>
|
||||||
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
|
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
|
||||||
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
@@ -399,7 +399,7 @@
|
|||||||
</method>
|
</method>
|
||||||
<method name="get_signal_connection_list" qualifiers="const">
|
<method name="get_signal_connection_list" qualifiers="const">
|
||||||
<return type="Array" />
|
<return type="Array" />
|
||||||
<argument index="0" name="signal" type="String" />
|
<argument index="0" name="signal" type="StringName" />
|
||||||
<description>
|
<description>
|
||||||
Returns an [Array] of connections for the given [code]signal[/code].
|
Returns an [Array] of connections for the given [code]signal[/code].
|
||||||
</description>
|
</description>
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
</method>
|
</method>
|
||||||
<method name="set">
|
<method name="set">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="property" type="String" />
|
<argument index="0" name="property" type="StringName" />
|
||||||
<argument index="1" name="value" type="Variant" />
|
<argument index="1" name="value" type="Variant" />
|
||||||
<description>
|
<description>
|
||||||
Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen.
|
Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen.
|
||||||
|
|||||||
Reference in New Issue
Block a user