tiny progress on generic part support

This commit is contained in:
darzu 2016-08-31 14:48:44 -07:00
parent 0f3c7b8c0f
commit f79b726f87
2 changed files with 8 additions and 0 deletions

View File

@ -41,6 +41,12 @@ namespace pxsim {
gpioPinsNeeded: number | number[],
}
export interface PartVisualDefinition {
image: string,
width: number,
height: number,
left: number,
top: number,
pinDist: number,
}
export interface PartDefinition {
visual: string | PartVisualDefinition,

View File

@ -159,6 +159,8 @@ namespace pxsim.visuals {
cmp.updateTheme();
cmp.updateState();
} else {
let vis = cmpDesc.visual as PartVisualDefinition;
console.log("TODO PART: " + vis.image);
//TODO: support generic parts
}
return cmp;