fix: make aliased signals snake case
This commit is contained in:
@@ -35,7 +35,7 @@ pub fn make_alias(client: &Arc<Client>) -> Arc<Node> {
|
|||||||
"hmd",
|
"hmd",
|
||||||
&HMD,
|
&HMD,
|
||||||
AliasInfo {
|
AliasInfo {
|
||||||
local_signals: vec!["getTransform"],
|
local_signals: vec!["get_transform"],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,19 +23,19 @@ use std::sync::{Arc, Weak};
|
|||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref ITEM_ALIAS_LOCAL_SIGNALS: Vec<&'static str> = vec![
|
static ref ITEM_ALIAS_LOCAL_SIGNALS: Vec<&'static str> = vec![
|
||||||
"getTransform",
|
"get_transform",
|
||||||
"setTransform",
|
"set_transform",
|
||||||
"setSpatialParent",
|
"set_spatial_parent",
|
||||||
"setSpatialParentInPlace",
|
"set_spatial_parent_in_place",
|
||||||
"setZoneable",
|
"set_zoneable",
|
||||||
"release",
|
"release",
|
||||||
];
|
];
|
||||||
static ref ITEM_ALIAS_LOCAL_METHODS: Vec<&'static str> = vec!["captureInto"];
|
static ref ITEM_ALIAS_LOCAL_METHODS: Vec<&'static str> = vec!["capture_into"];
|
||||||
static ref ITEM_ALIAS_REMOTE_SIGNALS: Vec<&'static str> = vec![];
|
static ref ITEM_ALIAS_REMOTE_SIGNALS: Vec<&'static str> = vec![];
|
||||||
static ref ITEM_ALIAS_REMOTE_METHODS: Vec<&'static str> = vec![];
|
static ref ITEM_ALIAS_REMOTE_METHODS: Vec<&'static str> = vec![];
|
||||||
static ref ITEM_TYPE_INFO_ENVIRONMENT: TypeInfo = TypeInfo {
|
static ref ITEM_TYPE_INFO_ENVIRONMENT: TypeInfo = TypeInfo {
|
||||||
type_name: "environment",
|
type_name: "environment",
|
||||||
aliased_local_signals: vec!["applySkyTex", "applySkyLight"],
|
aliased_local_signals: vec!["apply_sky_tex", "apply_sky_light"],
|
||||||
aliased_local_methods: vec![],
|
aliased_local_methods: vec![],
|
||||||
aliased_remote_signals: vec![],
|
aliased_remote_signals: vec![],
|
||||||
ui: Default::default(),
|
ui: Default::default(),
|
||||||
@@ -215,19 +215,19 @@ impl ItemUI {
|
|||||||
self.aliases.add(Arc::downgrade(&alias_node));
|
self.aliases.add(Arc::downgrade(&alias_node));
|
||||||
|
|
||||||
let _ = node.send_remote_signal(
|
let _ = node.send_remote_signal(
|
||||||
"create",
|
"create_item",
|
||||||
&item.specialization.serialize_start_data(&item.uid),
|
&item.specialization.serialize_start_data(&item.uid),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn handle_destroy_item(&self, item: &Item) {
|
fn handle_destroy_item(&self, item: &Item) {
|
||||||
self.send_state("destroy", item.uid.as_str());
|
self.send_state("destroy_item", item.uid.as_str());
|
||||||
}
|
}
|
||||||
fn handle_capture(&self, item: &Item) {
|
fn handle_capture(&self, item: &Item) {
|
||||||
self.send_state("capture", item.uid.as_str());
|
self.send_state("capture_item", item.uid.as_str());
|
||||||
}
|
}
|
||||||
fn handle_release(&self, item: &Item) {
|
fn handle_release(&self, item: &Item) {
|
||||||
self.send_state("release", item.uid.as_str());
|
self.send_state("release_item", item.uid.as_str());
|
||||||
}
|
}
|
||||||
fn handle_create_acceptor(&self, acceptor: &ItemAcceptor) {
|
fn handle_create_acceptor(&self, acceptor: &ItemAcceptor) {
|
||||||
let node = self.node.upgrade().unwrap();
|
let node = self.node.upgrade().unwrap();
|
||||||
@@ -323,7 +323,7 @@ impl Drop for ItemAcceptor {
|
|||||||
pub fn create_interface(client: &Arc<Client>) {
|
pub fn create_interface(client: &Arc<Client>) {
|
||||||
let node = Node::create(client, "", "item", false);
|
let node = Node::create(client, "", "item", false);
|
||||||
node.add_local_signal(
|
node.add_local_signal(
|
||||||
"create_environment_item_",
|
"create_environment_item",
|
||||||
environment::create_environment_item_flex,
|
environment::create_environment_item_flex,
|
||||||
);
|
);
|
||||||
node.add_local_signal(
|
node.add_local_signal(
|
||||||
|
|||||||
@@ -118,11 +118,11 @@ impl Zone {
|
|||||||
&zoneable.node.upgrade().unwrap(),
|
&zoneable.node.upgrade().unwrap(),
|
||||||
AliasInfo {
|
AliasInfo {
|
||||||
local_signals: vec![
|
local_signals: vec![
|
||||||
"setTransform",
|
"set_transform",
|
||||||
"setSpatialParent",
|
"set_spatial_parent",
|
||||||
"setSpatialParentInPlace",
|
"set_spatial_parent_in_place",
|
||||||
],
|
],
|
||||||
local_methods: vec!["getTransform"],
|
local_methods: vec!["get_transform"],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ lazy_static! {
|
|||||||
static ref ITEM_TYPE_INFO_PANEL: TypeInfo = TypeInfo {
|
static ref ITEM_TYPE_INFO_PANEL: TypeInfo = TypeInfo {
|
||||||
type_name: "panel",
|
type_name: "panel",
|
||||||
aliased_local_signals: vec![
|
aliased_local_signals: vec![
|
||||||
"applySurfaceMaterial",
|
"apply_surface_material",
|
||||||
"applyCursorMaterial",
|
"apply_cursor_material",
|
||||||
"pointerDeactivate",
|
"pointer_deactivate",
|
||||||
"pointerScroll",
|
"pointer_scroll",
|
||||||
"pointerButton",
|
"pointer_button",
|
||||||
"pointerMotion",
|
"pointer_motion",
|
||||||
"keyboardSetActive",
|
"keyboard_set_active",
|
||||||
"keyboardSetKeyState",
|
"keyboard_set_keyState",
|
||||||
"keyboardSetModifiers",
|
"keyboard_set_modifiers",
|
||||||
"resize",
|
"resize",
|
||||||
"close",
|
"close",
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user