tiny progress on generic part support
This commit is contained in:
parent
0f3c7b8c0f
commit
f79b726f87
@ -41,6 +41,12 @@ namespace pxsim {
|
|||||||
gpioPinsNeeded: number | number[],
|
gpioPinsNeeded: number | number[],
|
||||||
}
|
}
|
||||||
export interface PartVisualDefinition {
|
export interface PartVisualDefinition {
|
||||||
|
image: string,
|
||||||
|
width: number,
|
||||||
|
height: number,
|
||||||
|
left: number,
|
||||||
|
top: number,
|
||||||
|
pinDist: number,
|
||||||
}
|
}
|
||||||
export interface PartDefinition {
|
export interface PartDefinition {
|
||||||
visual: string | PartVisualDefinition,
|
visual: string | PartVisualDefinition,
|
||||||
|
@ -159,6 +159,8 @@ namespace pxsim.visuals {
|
|||||||
cmp.updateTheme();
|
cmp.updateTheme();
|
||||||
cmp.updateState();
|
cmp.updateState();
|
||||||
} else {
|
} else {
|
||||||
|
let vis = cmpDesc.visual as PartVisualDefinition;
|
||||||
|
console.log("TODO PART: " + vis.image);
|
||||||
//TODO: support generic parts
|
//TODO: support generic parts
|
||||||
}
|
}
|
||||||
return cmp;
|
return cmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user