Refactoring: port "statisticsGUI" to svelte

This commit is contained in:
Pieter Vander Vennet 2024-11-17 02:03:16 +01:00
parent f807f43399
commit dc10a3fe56
8 changed files with 334 additions and 389 deletions

View file

@ -18,19 +18,3 @@ export default class Toggle extends VariableUiElement {
this.isEnabled = isEnabled
}
}
/**
* Same as `Toggle`, but will swap on click
*/
export class ClickableToggle extends Toggle {
public declare readonly isEnabled: UIEventSource<boolean>
constructor(
showEnabled: string | BaseUIElement,
showDisabled: string | BaseUIElement,
isEnabled: UIEventSource<boolean> = new UIEventSource<boolean>(false)
) {
super(showEnabled, showDisabled, isEnabled)
this.isEnabled = isEnabled
}
}