Simplified Skins.getOutline() method and fixed it to retrieve the skins from files in res.skinpath instead of from the code directory
This commit is contained in:
parent
6c80b3f2e9
commit
6584f1dd7d
1 changed files with 7 additions and 12 deletions
|
@ -179,23 +179,18 @@ Skins.prototype.getOutline = function(type) {
|
||||||
return outline;
|
return outline;
|
||||||
}
|
}
|
||||||
|
|
||||||
var prototype, skin, subskins, names, skins = [];
|
var skinfiles, prototype, skin, subskins, names, skins = [];
|
||||||
var options = Skin.getPrototypeOptions();
|
var options = Skin.getPrototypeOptions();
|
||||||
|
|
||||||
for each (var option in options) {
|
for each (var option in options) {
|
||||||
prototype = option.value;
|
|
||||||
names = [];
|
names = [];
|
||||||
for (var name in app.skinfiles[prototype]) {
|
prototype = option.value;
|
||||||
if (name === prototype && type !== "custom") {
|
skinfiles = app.getSkinfilesInPath(res.skinpath);
|
||||||
skin = createSkin(app.skinfiles[prototype][name]);
|
skin = createSkin(skinfiles[prototype][prototype]);
|
||||||
subskins = skin.getSubskinNames();
|
subskins = skin.getSubskinNames();
|
||||||
for each (var subskin in subskins) {
|
for each (var subskin in subskins) {
|
||||||
names.push(subskin);
|
names.push(subskin);
|
||||||
}
|
}
|
||||||
} else if (name !== prototype && type === "custom") {
|
|
||||||
names.push(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
names.sort();
|
names.sort();
|
||||||
skins.push([prototype, names]);
|
skins.push([prototype, names]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue