GetDescendants
This commit is contained in:
parent
a394778a8e
commit
261e0a474e
@ -66,6 +66,17 @@ impl mlua::UserData for Instance{
|
||||
Ok(children)
|
||||
})
|
||||
);
|
||||
methods.add_method("GetDescendants",|lua,this,_:()|
|
||||
dom(lua,|dom|{
|
||||
let children:Vec<_>=dom
|
||||
.descendants_of(this.referent)
|
||||
.map(|instance|
|
||||
Instance::new(instance.referent())
|
||||
)
|
||||
.collect();
|
||||
Ok(children)
|
||||
})
|
||||
);
|
||||
methods.add_method("IsA",|lua,this,classname:mlua::String|
|
||||
dom(lua,|dom|{
|
||||
let instance=this.get(dom)?;
|
||||
|
Loading…
Reference in New Issue
Block a user