mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-02 05:39:07 +08:00
Support audio path in SpineEventData (#2303)
This commit is contained in:
parent
468985bd35
commit
9be78dbd20
@ -38,6 +38,8 @@ void SpineEventData::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_float_value", "v"), &SpineEventData::set_float_value);
|
ClassDB::bind_method(D_METHOD("set_float_value", "v"), &SpineEventData::set_float_value);
|
||||||
ClassDB::bind_method(D_METHOD("get_string_value"), &SpineEventData::get_string_value);
|
ClassDB::bind_method(D_METHOD("get_string_value"), &SpineEventData::get_string_value);
|
||||||
ClassDB::bind_method(D_METHOD("set_string_value", "v"), &SpineEventData::set_string_value);
|
ClassDB::bind_method(D_METHOD("set_string_value", "v"), &SpineEventData::set_string_value);
|
||||||
|
ClassDB::bind_method(D_METHOD("get_audio_path"), &SpineEventData::get_audio_path);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_audio_path", "v"), &SpineEventData::set_audio_path);
|
||||||
ClassDB::bind_method(D_METHOD("get_volume"), &SpineEventData::get_volume);
|
ClassDB::bind_method(D_METHOD("get_volume"), &SpineEventData::get_volume);
|
||||||
ClassDB::bind_method(D_METHOD("set_volume", "v"), &SpineEventData::set_volume);
|
ClassDB::bind_method(D_METHOD("set_volume", "v"), &SpineEventData::set_volume);
|
||||||
ClassDB::bind_method(D_METHOD("get_balance"), &SpineEventData::get_balance);
|
ClassDB::bind_method(D_METHOD("get_balance"), &SpineEventData::get_balance);
|
||||||
@ -79,6 +81,16 @@ void SpineEventData::set_string_value(const String &v) {
|
|||||||
get_spine_object()->setStringValue(spine::String(v.utf8()));
|
get_spine_object()->setStringValue(spine::String(v.utf8()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String SpineEventData::get_audio_path() {
|
||||||
|
SPINE_CHECK(get_spine_object(), "")
|
||||||
|
return get_spine_object()->getAudioPath().buffer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpineEventData::set_audio_path(const String &v) {
|
||||||
|
SPINE_CHECK(get_spine_object(), )
|
||||||
|
get_spine_object()->setAudioPath(spine::String(v.utf8()));
|
||||||
|
}
|
||||||
|
|
||||||
float SpineEventData::get_volume() {
|
float SpineEventData::get_volume() {
|
||||||
SPINE_CHECK(get_spine_object(), 0)
|
SPINE_CHECK(get_spine_object(), 0)
|
||||||
return get_spine_object()->getVolume();
|
return get_spine_object()->getVolume();
|
||||||
|
|||||||
@ -55,6 +55,10 @@ public:
|
|||||||
|
|
||||||
void set_string_value(const String &v);
|
void set_string_value(const String &v);
|
||||||
|
|
||||||
|
String get_audio_path();
|
||||||
|
|
||||||
|
void set_audio_path(const String &v);
|
||||||
|
|
||||||
float get_volume();
|
float get_volume();
|
||||||
|
|
||||||
void set_volume(float v);
|
void set_volume(float v);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user