From 827c630a70294eaeeb3e8c06b3db12de34a3888a Mon Sep 17 00:00:00 2001 From: Nova Date: Tue, 6 Aug 2024 12:08:19 -0400 Subject: [PATCH] refactor(input): rename internal capture requests --- src/nodes/input/method.rs | 8 +++++--- src/nodes/input/mod.rs | 2 +- src/objects/input/mouse_pointer.rs | 4 ++-- src/objects/input/sk_controller.rs | 4 ++-- src/objects/input/sk_hand.rs | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/nodes/input/method.rs b/src/nodes/input/method.rs index 784e4cc..d235050 100644 --- a/src/nodes/input/method.rs +++ b/src/nodes/input/method.rs @@ -25,7 +25,7 @@ pub struct InputMethod { handler_aliases: AliasList, handler_field_aliases: AliasList, pub(super) handler_order: Mutex>>, - pub capture_requests: Registry, + pub internal_capture_requests: Registry, pub captures: Registry, } impl InputMethod { @@ -42,7 +42,7 @@ impl InputMethod { handler_aliases: AliasList::default(), handler_field_aliases: AliasList::default(), handler_order: Mutex::new(Vec::new()), - capture_requests: Registry::new(), + internal_capture_requests: Registry::new(), captures: Registry::new(), }; ::add_node_members(node); @@ -167,7 +167,9 @@ impl InputMethodRefAspect for InputMethod { let input_method = node.get_aspect::()?; let input_handler = handler.get_aspect::()?; - input_method.capture_requests.add_raw(&input_handler); + input_method + .internal_capture_requests + .add_raw(&input_handler); Ok(()) } } diff --git a/src/nodes/input/mod.rs b/src/nodes/input/mod.rs index 000ef1d..716918d 100644 --- a/src/nodes/input/mod.rs +++ b/src/nodes/input/mod.rs @@ -145,6 +145,6 @@ pub fn process_input() { let _ = input_handler_client::input(&handler_node, &methods, &datas); } for method in methods { - method.capture_requests.clear(); + method.internal_capture_requests.clear(); } } diff --git a/src/objects/input/mouse_pointer.rs b/src/objects/input/mouse_pointer.rs index bfff3f1..b498a2f 100644 --- a/src/objects/input/mouse_pointer.rs +++ b/src/objects/input/mouse_pointer.rs @@ -150,7 +150,7 @@ impl MousePointer { if let Some(capture) = &self.capture { if !self .pointer - .capture_requests + .internal_capture_requests .get_valid_contents() .contains(capture) { @@ -161,7 +161,7 @@ impl MousePointer { if self.capture.is_none() { if let Some(new_capture) = self .pointer - .capture_requests + .internal_capture_requests .get_valid_contents() .into_iter() .map(|h| { diff --git a/src/objects/input/sk_controller.rs b/src/objects/input/sk_controller.rs index c86c146..99c3af4 100644 --- a/src/objects/input/sk_controller.rs +++ b/src/objects/input/sk_controller.rs @@ -104,7 +104,7 @@ impl SkController { if let Some(capture) = &self.capture { if !self .input - .capture_requests + .internal_capture_requests .get_valid_contents() .contains(capture) { @@ -115,7 +115,7 @@ impl SkController { if self.capture.is_none() { self.capture = self .input - .capture_requests + .internal_capture_requests .get_valid_contents() .into_iter() .map(|handler| { diff --git a/src/objects/input/sk_hand.rs b/src/objects/input/sk_hand.rs index 8e64a8e..ed796b4 100644 --- a/src/objects/input/sk_hand.rs +++ b/src/objects/input/sk_hand.rs @@ -139,7 +139,7 @@ impl SkHand { if let Some(capture) = &self.capture { if !self .input - .capture_requests + .internal_capture_requests .get_valid_contents() .contains(capture) { @@ -150,7 +150,7 @@ impl SkHand { if self.capture.is_none() { self.capture = self .input - .capture_requests + .internal_capture_requests .get_valid_contents() .into_iter() .map(|handler| (handler.clone(), self.compare_distance(&handler.field).abs()))