Added full source code
This commit is contained in:
commit
33f8586698
1377 changed files with 123808 additions and 0 deletions
misc/Legacy Worlds.wdgt/lib/LWWidget/Data
25
misc/Legacy Worlds.wdgt/lib/LWWidget/Data/Node.js
Normal file
25
misc/Legacy Worlds.wdgt/lib/LWWidget/Data/Node.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
LWWidget.Data.Node = LWWidget.Data.inherits({
|
||||
|
||||
constructor: function (name) {
|
||||
this.base(name);
|
||||
this.contents = new Array();
|
||||
},
|
||||
|
||||
addChild: function (child) {
|
||||
if (child instanceof LWWidget.Data.Node || child instanceof LWWidget.Data.Leaf) {
|
||||
this.contents.push(child);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
getChildren: function (name) {
|
||||
var _c = new Array();
|
||||
for (var i in this.contents) {
|
||||
if (this.contents[i] && this.contents[i].name == name) {
|
||||
_c.push(this.contents[i]);
|
||||
}
|
||||
}
|
||||
return _c;
|
||||
}
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue