mapcomplete/UI/Base/CheckBox.ts

19 lines
383 B
TypeScript
Raw Normal View History

2020-07-20 11:30:58 +00:00
import {UIElement} from "../UIElement";
import {UIEventSource} from "../UIEventSource";
export class CheckBox extends UIElement{
2020-07-20 11:37:33 +00:00
private data: UIEventSource<boolean>;
2020-07-20 11:30:58 +00:00
constructor(data: UIEventSource<boolean>) {
super(data);
2020-07-20 11:37:33 +00:00
this.data = data;
2020-07-20 11:30:58 +00:00
}
protected InnerRender(): string {
2020-07-20 11:37:33 +00:00
return "Current val: "+this.data.data;
2020-07-20 11:30:58 +00:00
}
}