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,22 +179,17 @@ Skins.prototype.getOutline = function(type) {
|
|||
return outline;
|
||||
}
|
||||
|
||||
var prototype, skin, subskins, names, skins = [];
|
||||
var skinfiles, prototype, skin, subskins, names, skins = [];
|
||||
var options = Skin.getPrototypeOptions();
|
||||
|
||||
for each (var option in options) {
|
||||
prototype = option.value;
|
||||
names = [];
|
||||
for (var name in app.skinfiles[prototype]) {
|
||||
if (name === prototype && type !== "custom") {
|
||||
skin = createSkin(app.skinfiles[prototype][name]);
|
||||
subskins = skin.getSubskinNames();
|
||||
for each (var subskin in subskins) {
|
||||
names.push(subskin);
|
||||
}
|
||||
} else if (name !== prototype && type === "custom") {
|
||||
names.push(name);
|
||||
}
|
||||
prototype = option.value;
|
||||
skinfiles = app.getSkinfilesInPath(res.skinpath);
|
||||
skin = createSkin(skinfiles[prototype][prototype]);
|
||||
subskins = skin.getSubskinNames();
|
||||
for each (var subskin in subskins) {
|
||||
names.push(subskin);
|
||||
}
|
||||
names.sort();
|
||||
skins.push([prototype, names]);
|
||||
|
|
Loading…
Add table
Reference in a new issue