mapcomplete/UI/Base/CheckBox.ts

19 lines
383 B
TypeScript
Raw Normal View History

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