46 lines
683 B
JavaScript
46 lines
683 B
JavaScript
|
|
|
||
|
|
|
||
|
|
import themeSelectorImage from "./themeSelector.image.js";
|
||
|
|
|
||
|
|
import themeSelectorLabel from "./themeSelector.label.js";
|
||
|
|
|
||
|
|
|
||
|
|
export default class themeSelector{
|
||
|
|
|
||
|
|
flexDirection = "column";
|
||
|
|
|
||
|
|
marginBottom = 20;
|
||
|
|
|
||
|
|
constructor( name ) {
|
||
|
|
|
||
|
|
this.selectLabel.text = name;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
highlight() {
|
||
|
|
|
||
|
|
var children = this.parent.getChildren();
|
||
|
|
|
||
|
|
for (var i = 0; i < children.length; i++) {
|
||
|
|
|
||
|
|
children[i].selectImage.lowLight();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
this.selectImage.highlight();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
setImage( image ) {
|
||
|
|
|
||
|
|
this.selectImage.backgroundImage = "url("+image+")";
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
selectImage = new themeSelectorImage();
|
||
|
|
|
||
|
|
selectLabel = new themeSelectorLabel();
|
||
|
|
|
||
|
|
}
|