First commit
This commit is contained in:
45
application/demo/pages/appearance/themeSelector.js
Normal file
45
application/demo/pages/appearance/themeSelector.js
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user