2
0
mirror of https://github.com/esiur/iui.git synced 2026-04-04 23:18:21 +00:00

initial commit

This commit is contained in:
2021-02-22 11:39:50 +03:00
commit e82f4bc4cf
87 changed files with 14463 additions and 0 deletions

40
src/UI/Background.js Normal file
View File

@@ -0,0 +1,40 @@
import IUIElement from "../Core/IUIElement.js";
import { IUI } from "../Core/IUI.js";
export default IUI.module(class Background extends IUIElement {
constructor() {
super({ cssClass: 'background' });
this.classList.add(this.cssClass);
this._register("visible");
}
create() {
}
hide() {
return this.setVisible(false);
}
show() {
return this.setVisible(true);
}
setVisible(value) {
this.visible = value;
if (value) {
this.classList.add(this.cssClass + "-visible");
}
else {
this.classList.remove(this.cssClass + "-visible");
}
this._emit("visible", value);
return this;
}
});