46 lines
811 B
JavaScript
46 lines
811 B
JavaScript
|
|
|
||
|
|
import themeTintSelector from "./tint.selector.js"
|
||
|
|
|
||
|
|
import tools from '/unify/tools.js';
|
||
|
|
|
||
|
|
|
||
|
|
export default class themeTintSelectors{
|
||
|
|
|
||
|
|
|
||
|
|
themeLight = new themeTintSelector("Light");
|
||
|
|
|
||
|
|
themeDark = new themeTintSelector("Dark");
|
||
|
|
|
||
|
|
|
||
|
|
updateImages( os ) {
|
||
|
|
|
||
|
|
os = os.toLowerCase();
|
||
|
|
|
||
|
|
var tint = tools.CamelCase( this.getRoot().tint );
|
||
|
|
|
||
|
|
|
||
|
|
this.themeDark.setImage("/assets/images/themeSelectors/" + os + "Dark.png");
|
||
|
|
|
||
|
|
this.themeLight.setImage("/assets/images/themeSelectors/" + os + "Light.png");
|
||
|
|
|
||
|
|
this["theme"+tint].highlight();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
create() {
|
||
|
|
|
||
|
|
this.themeDark.highlight();
|
||
|
|
|
||
|
|
this.themeDark.setImage('/assets/images/themeSelectors/windowsDark.png');
|
||
|
|
|
||
|
|
this.themeLight.setImage('/assets/images/themeSelectors/windowsLight.png');
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
layers = 1;
|
||
|
|
|
||
|
|
margin = 4;
|
||
|
|
|
||
|
|
marginLeft = "auto";
|
||
|
|
|
||
|
|
}
|