Files
KSP-MGA-Planner/dist/main/editor/buttons.js
Krafpy 522f590138 Added button to displayed detailed text panel.
Also refactored `button.ts` to use a common `Button` class instead
of separate `SubmitButton` and `StopButton` types.
2023-01-02 14:46:32 +01:00

15 lines
277 B
JavaScript

export class Button {
constructor(id) {
this._btn = document.getElementById(id);
}
enable() {
this._btn.disabled = false;
}
disable() {
this._btn.disabled = true;
}
click(action) {
this._btn.onclick = action;
}
}