refactor(input): switch to manual handler order

This commit is contained in:
Nova
2024-04-16 08:00:07 -04:00
parent 226554fadc
commit be2f5b8e37
14 changed files with 414 additions and 150 deletions

View File

@@ -55,7 +55,7 @@ pub type Method = fn(Arc<Node>, Arc<Client>, Message, MethodResponseSender);
stardust_xr_server_codegen::codegen_node_protocol!();
pub struct Node {
pub enabled: Arc<AtomicBool>,
enabled: Arc<AtomicBool>,
pub(super) uid: String,
path: String,
client: Weak<Client>,
@@ -113,6 +113,9 @@ impl Node {
.scenegraph
.add_node(self))
}
pub fn enabled(&self) -> bool {
self.enabled.load(Ordering::Relaxed)
}
pub fn destroy(&self) {
if let Some(client) = self.get_client() {
client.scenegraph.remove_node(self.get_path());